c# - How to selenium.GetXpathCount for this element? -


ctl00_content_ctl00_chkproduct_0 ctl00_content_ctl00_chkproduct_1 ctl00_content_ctl00_chkproduct_2 ... ctl00_content_ctl00_chkproduct_19 ctl00_content_ctl00_chkproduct_20 

what expression should use count 21 elements?

i've used

decimal count = selenium.getxpathcount("//*[@id='ctl00_content_ctl00_chkproduct_.*']"); decimal count = selenium.getxpathcount("//*[@id='ctl00_content_ctl00_chkproduct_[.*]']"); decimal count = selenium.getxpathcount("//*[@id='ctl00_content_ctl00_chkproduct_.']"); 

but none of them worked... please help.

use:

//*[starts-with(@id,'ctl00_content_ctl00_chkproduct_')] 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -