Forum Discussion

TestingHobo's avatar
TestingHobo
Contributor
11 years ago

Interacting with object by ID


Hi All,



Is there anyway to interact (click, settext etc) via ID



Having previously only used Selenium i wirte most of my tests using Xpaths.

Example: Sys.Browser().Page("*").FindChildByXPath("//*[@id='238897'][@type = 'textbox']").SetText("/")



As you can see in the Xpath is the ID, does TC give an option to do the above but with ID?



TIA

Rich


1 Reply

  • Hi Rich,

     


    The FindChildByXPath method is looking for objects between the HTML elements. So, if the desired object contains the ID attribute, you can use it in the method.