Forum Discussion
dganov
Staff
12 years agoIf finding object by CSS Selector or XPath, test scripts have to be updated frequently when each time of updating web page.
If ID of the element is unique on the web page then you should not worry about the page structure, you should just call something like that:
var obj = page.QuerySelector("#element_id");
if (obj != null)
obj.Click();
If ID of the element is unique on the web page then you should not worry about the page structure, you should just call something like that:
var obj = page.QuerySelector("#element_id");
if (obj != null)
obj.Click();