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

authentication - Mongodb revoke acccess to connect test database -

python - GitPython: check if git is available -

c - getting error: cannot take the address of an rvalue of type 'int' -