java - How to get the text in array and compare the value with data in excel in Selenium Webdriver -
code used:
int n = 0; int a[10] = null; for(int i=1;i<n;i++) { a[i] = driver.findelement(by.xpath(".//*[@id='steplist']/li[n]")).gettext(); system.out.println("/userid ="+a[i]); }
please me convert string , int , , how can values of li , store in n ?
you can elements have same xpath using findelements instead of findelement can this:
webelement elements = driver.findelements(by.xpath(".//*[@id='steplist']/li")) for(webelement elem: elements) { a.add(elem.gettext()); }
for excel can use jexcelapi
Comments
Post a Comment