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 "[email protected]" 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 Answer 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, 2016 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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