18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Element not found exception isn't registered !!
I ran the below command and the element wasn't found on the web application, but there wasn't any exception thrown/registered.
code :
browser.click(browser.button("add"));
The button text was "Add" but I gave it as "add" , here there wasn't a click nor an "element not found exception" registered.
Btw this works if for browser.click(browser.button("Add"));
Regards,
shArath
code :
browser.click(browser.button("add"));
The button text was "Add" but I gave it as "add" , here there wasn't a click nor an "element not found exception" registered.
Btw this works if for browser.click(browser.button("Add"));
Regards,
shArath
Answers
I tried what you said with Sahi OS4.4.
After the test fails, the first line of the trace gives the following message:
What are you seeing after the test fails?
Regards.
Regards,
shArath
I have had sometimes problems that my code has used the button/field that's not even visible. In that case there will be no error.
Firstly, I confirmed this using the below code :
browser.exists(browser.button("add"))
it returned false.
so obviously the element isn't present on the page. And then with this browser.click(browser.button("add"));
it should throw an exception?
Regards,
shArath