Reputation: 81
Kindly provide appropriate solution for this Query ?
In Web sit,One customer page is there,Where it display the customer name, i wants to read this customer name and pass the same value in some other page in customer name Text Field.How can i do this ?
Upvotes: 0
Views: 5278
Reputation: 933
You can store the name of customer in the first page
String name= driver.findElement(By .id("searchString")).getAttribute("value");
and then call the string later whenever needed. If you want to pass the same value to some other field then you can use the code
driver.findElement(By .id("id of element")).sendKeys(name);
by calling the string here the name will be passed.
Upvotes: 2
Reputation: 529
using httpGet you can read the values of the old customer and capture those values and pass them to the new form
Upvotes: 0