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.
Is it a good idea to access element by TagName?It has worked till now.
In Sahi script I am accessing elements for condition check like (top.document.getElementsByTagName('input')[4]=="Some Text") and it has worked till now for me. But I am not sure what can be consequences of this in future, I know it's always good to access elements by ID but I am not able to locate ID part?
Comments
_assertContainsText("Invalid date format",$(".errormessagecontainer")[0]); ---- for the error messages displayed on the page and does not contain the id
here "errormessagecontainer" is the class name of the DIV and [0] is the occurrence of that class on the page.