java - finding the number of pagination buttons in selenium webdriver -


pagination last row of table "contentplaceholder1_gvchannellist". want count number of pages/number of columns in pagination table.

driver.findelements(by.id("//*[@id='contentplaceholder1_gvchannellist']/tbody/tr[17]/td/table/tbody/tr/td")).size() 

is returning 0 though there 5 columns/<td> tags.

html table element hierarchy

you searching id, gave xpath expression. try

driver.findelements(by.xpath("//*[@id='contentplaceholder1_gvchannellist']/tbody/tr[17]/td/table/tbody/tr/td")).size() 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -