I am using OpenTest Build: 1.3.8 Feb 25, 18:58 Commit: 50659ecda06a
I am trying to select the following element
<input type="checkbox" aria-label="Select Record 2,387,701" class="ebx_checkboxCustom">
using the following action
- description: Select Record to Approve
action: org.getopentest.selenium.Click
args:
locator: {css: "input[aria-label='Select Record 2,387,701']"}
but i am getting the following error in the log
The action definition was:
{
"action": "org.getopentest.selenium.Click",
"args": {
"locator": {
"css": "input[aria-label='Select Record 2,387,701']"
}
},
"description": "Select Record to Approve"
}
at org.getopentest.base.TestActor.executeTestSegment(TestActor.java:2142)
... 3 more
Caused by: java.lang.RuntimeException: Failed executing action org.getopentest.selenium.Click with arguments {"locator":{"css":"input[aria-label='Select Record 2,387,701']"}}
at org.getopentest.base.TestActor.executeActionByDef(TestActor.java:1872)
at org.getopentest.base.TestActor.executeTestSegment(TestActor.java:2092)
... 3 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Failed clicking on element By.cssSelector: input[aria-label='Select Record 2,387,701']
at org.getopentest.base.TestActor.executeActionByClassName(TestActor.java:1670)
at org.getopentest.base.TestActor.executeActionByDef(TestActor.java:1749)
... 4 more
Caused by: java.lang.RuntimeException: Failed clicking on element By.cssSelector: input[aria-label='Select Record 2,387,701']
at org.getopentest.selenium.Click.run(Click.java:34)
at org.getopentest.base.TestActor.executeAction(TestActor.java:1571)
at org.getopentest.base.TestActor.executeActionByClassName(TestActor.java:1647)
... 5 more
Caused by: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for presence of element located by: By.cssSelector: input[aria-label='Select Record 2,387,701'] (tried for 10 second(s) with 500 milliseconds interval)
at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:95)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)
at org.getopentest.selenium.core.SeleniumTestAction.getElement(SeleniumTestAction.java:58)
at org.getopentest.selenium.core.SeleniumTestAction.getElement(SeleniumTestAction.java:50)
at org.getopentest.selenium.Click.run(Click.java:29)
... 7 more
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"input[aria-label='Select Record 2,387,701']"}
(Session info: chrome=112.0.5615.138)
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
I tried adding a delay before the action to make sure all the elements loaded and tried using its parent element as a locator since "Select Record 2,387,701" is the unique identifier for the locator
<label class="ebx_CheckboxButton_Label ebx_emptyLabel" title="Select Record 2,387,701"><input type="checkbox" aria-label="Select Record 2,387,701" class="ebx_checkboxCustom"><i class="ebx_checkboxDisplay" aria-hidden="true"> </i></label>
but i got the same error