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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -