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

You use this


XPath –  .//*[starts-with(@id, ‘ht_’]/div[2]/div/div/div/table/thead/tr/th[1]

Professor Answered on November 4, 2015.

Is there a way to extract id ‘ht_29ad853cf427c8fd’ from the previous div tag??

on February 18, 2016.
Add Comment

Your Answer

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