RE: How to pass excel data to our applicaion text box using java code.

Guys, I am new to selenium and Java. Need your help to resolve the above query. I tried using the below code but value is not passed.

Row row=sh.getRow(1);
Cell cell=row.getCell(0);
Cell col1=row.getCell(1);

WebElement btn=driver.findElement(“btnLogin”));
ele.sendKeys(cell);                      //userid  – passing excel data
ele1.sendKeys(col1);                //password – passing excel data
clk.selectByIndex(0);               //select from drop down;                                      //Click login button.

Add Comment
1 Answers

Have you tried to print the data in console  after fetching the data from excel . Either paste your complete code or provide more information . Since it is very basic thing .

Default Answered on January 12, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.