Forum Discussion
Marsha,
Yes we have product names which are unique Ex: Auto, Homeowner..ctc.and Each product has unique set of data. I can read the product name only after initializing the application..
"For instance, if you are logging into Prod1 you launch it and it is called MyProduct1 in the window somewhere, then I would change that first column to MyProduct1 in the Excel sheet. Then when you launch the application inside the test, the test can read the product name and use that string to look up the correct line in the Excel sheet."
Can you guide with steps how to read and update excel. And also changes need to make in the test to read the product name and use that string to look up the correct line in the Excel sheet
In advance really appreciated your help
I don't know javascript but I can give you a general idea
Create a project variable called ProductName and then do something like this
*whatever you do to start application*
Set variable ProductName = product name as read from window
DDT loop
while (not out of Excel lines) and (Excel.FirstColumn.Value not equal to Project.Variables.ProductName
next DDT /* stop when you find the right product or if it's not found at all*
If Excel.FirstColumn.Value = Project.Variables.ProductName then
use Excel values to log in
Else
product wasn't found in Excel, log error
*other test steps follow here*
If you need javascript syntax, someone else will have to jump in. :)
Related Content
- 5 years agoloridee
- 8 years agoBhuvanShanmugam
Recent Discussions
- 2 days agoGane195