RE: Select checkbox in WebTable whose ID changes Dynamically

I need to select a check box  in a web table whose ID keeps changing dynamically.

XPath  – .//*[@id=’ht_29ad853cf427c8fd’]/div[2]/div/div/div/table/thead/tr/th[1]

next time the ID of the table is

XPath –  .//*[@id=’ht_e67040a19393993a’]/div[2]/div/div/div/table/thead/tr/th[1]

Please suggest

SD Train Asked on November 4, 2015 in Selenium WebDriver.
Add Comment
3 Answers

This does not work I am getting Invalid XPATH

.//input[starts-with(@id, ‘ht_’)]/div[1]/div/div/div/table/tbody/tr[1]/td[1]

Tried this also… 

Train Answered on November 5, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.