How to implement "Store Value" Keyword. | Selenium Forum
M
Posted on 02/12/2015
Hi,
I need to store the system generated(dynamic) values and then Re-use it in the application. how can i implement the logic for the same. I am using keyword driven framework.

M
Replied on 02/12/2015

give a few more details of what are you trying to do.

like screen shot, how are you extracting the data?


M
Replied on 03/12/2015

As per the screenshot attached,
when we click on the generate button then after few time dynamic Id will generate in the text box which is highlighted in the yellow color. i need to use this system generated id many time throughout the application. so i needs to store it, How could i do the same??

I want to implement keyword for it so that i can use that keyword anywhere which will store the dynamically generated values.

Responsive image

M
Replied on 03/12/2015

driver.findelement(By.xpath(" path\to\generatebutton ")).click();
thread.sleep(5000);
String ID = driver.findelement(By.xpath(" path\to\textbox ")).getText();
system.out.print(ID);