Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Browser/keywords/getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,6 @@ def convert_str(f):
return f.name if isinstance(f, ElementState) else f

assertion_expected_str = [convert_str(flag) for flag in assertion_expected]
self.presenter_mode(selector, self.strict_mode)
with self.playwright.grpc_channel() as stub:
response = stub.GetElementStates(
Request.ElementSelector(selector=selector, strict=self.strict_mode)
Expand Down
12 changes: 5 additions & 7 deletions atest/test/01_Browser_Management/timeout.robot
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ Resource imports.resource
Suite Setup New Browser
Suite Teardown Close Browser

Force Tags timeout

Force Tags timeout

*** Variables ***
${err_goto} = page.goto: Timeout 1ms exceeded.
${err_click} = SEPARATOR=
... locator.click: Timeout 100ms exceeded.
... *Use "Set Browser Timeout" for increasing the timeout or double check${SPACE}
... your locator as the targeted element(s) couldn't be found.

${err_click} = SEPARATOR=
... locator.click: Timeout 100ms exceeded.
... *Use "Set Browser Timeout" for increasing the timeout or double check${SPACE}
... your locator as the targeted element(s) couldn't be found.

*** Test Cases ***
Test GoTo With Short Default Timeout
Expand Down
2 changes: 1 addition & 1 deletion atest/test/03_Waiting/wait_for_http.robot
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Wait For Navigation Works With Wait_until
END
[Teardown] Set Browser Timeout ${old timeout}

Promise To Wait For Navigation With wait_until
Promise To Wait For Navigation With Wait_until
${old timeout} = Set Browser Timeout 4s
Go To ${ROOT_URL}/redirector.html
${page_navigation} = Promise To Wait For Navigation url=${ROOT_URL}/posted.html wait_until=networkidle
Expand Down
31 changes: 30 additions & 1 deletion atest/test/05_JS_Tests/on_page_js.robot
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,35 @@ Evaluate Multiline JavaScript With Singel Element
Length Should Be ${texts} 2
Should Be Equal ${texts}[-1] Hello World

Evaluate Multiline JavaScript With Strict Mode Disabled And All Elements
${org} = Set Strict Mode False
${length} = Evaluate JavaScript button
... (elements) => {
... return elements.length
... }
... all_elements=True
Should Be Equal ${length} ${11}
[Teardown] Set Strict Mode ${org}

Evaluate Multiline JavaScript With Strict Mode Enabled And All Elements
${org} = Set Strict Mode True
${length} = Evaluate JavaScript button
... (elements) => {
... return elements.length
... }
... all_elements=True
Should Be Equal ${length} ${11}
[Teardown] Set Strict Mode ${org}

Evaluate Multiline JavaScript With Strict Mode Disabled And Single Element
${org} = Set Strict Mode False
${text} = Evaluate JavaScript button
... (e) => {
... return e.innerText
... }
Should Be Equal ${text} Visible
[Teardown] Set Strict Mode ${org}

Evaluate Multiline JavaScript Strict Mode Error
Run Keyword And Expect Error
... *strict mode violation*input*resolved to 4 elements*
Expand Down Expand Up @@ -110,7 +139,7 @@ Highlight Element On Page
Highlight Elements .pure-button duration=1000ms
Set Strict Mode True
Get Element Count .robotframework-browser-highlight == 5
Sleep 9000ms
Sleep 1500ms
Get Element Count .robotframework-browser-highlight == 0

Highlight Element With Strict
Expand Down
2 changes: 1 addition & 1 deletion node/playwright-wrapper/evaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function evaluateJavascript(

async function getJSResult() {
if (selector !== '') {
const locator = await findLocator(state, selector, strictMode, undefined, true);
const locator = await findLocator(state, selector, strictMode, undefined, !allElements);
if (allElements) {
return await locator.evaluateAll(script, arg);
}
Expand Down