I need to pass values from excel sheet ( stored in variable api ) to XPATH in eclipse (java - Selenium).
I tried several options but none works. Please guide.
Here is my line of code.
String appcode = //input[contains(@id,'app') and contains(@type,'text') and ancestor::div[contains(@id, '+api+')]]
When i hardcode the value of api as below it works.
String appcode="//input[contains(@id,'app') and contains(@type,'text') and ancestor::div[contains(@id, 'setmember')]]";
Isnt it this easy?
Appreciate your help
pk