2

I have written a script which reads data from excel file and I use sendKeys method to input that data to textbox. Now I want to append/concatenate data after reading from excel and than resultant string I want to send as input to textbox using selenium webdriver following is code snippet

following code read data as "john" I want to append "john@example.com" after reading from excel and want to send it as input to textbox for "FName"

driver.findElement(By.xpath(".//*[@id='accountName']")).sendKeys(objExcel.getCellData("FName", i));
1
sendKeys(objExcel.getCellData("Fname",i) + "@example.com");

Hope I understood your question correctly (just wondering).

  • yes I've already managed to do it on my own, however thank you for your response! – Hassan Apr 8 '16 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.