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 - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

Reversible shuffling a int array in java -