execution does not use value of input data driven parameter

Ask general questions here.
rk325
Posts: 23
Joined: Mon Mar 27, 2023 6:02 pm

execution does not use value of input data driven parameter

Post by rk325 » Fri Mar 31, 2023 6:14 pm

I am testing a web application, using C# code, nothing is recorded.
I have an excel file with the following data. I read these data and assign them to module variables: url, email, password respectively. Then I use those variables to enter values into a login form. The variables all are read correctly from the excel, BUT I am having issues with line 3 in this data: the "email" variable is empty for line 3, but its empty value is not set to the Login textbox; the code keeps writing to the Email textbox "[email protected]".

Does not matter if I move line 3 of the excel to the bottom or top; it always prints an email to the textbox.

Note that I don't have that issue with line 4 that has an empty password value.

I am suspecting has to do with the dropdown that shows when the program clicks the email textbox, because I see in the dropdown a list of all the emails I have tested with.

Code: Select all

1   url                 email              password
2   http://test.com     [email protected]     123456!
3   http://test.com                        123456!
4   http://test.com     [email protected]
Here is the simple code for login:
var emailTxt = repo.LoginTest.LoginInput.Email;
var passwordTxt = repo.LoginTest.LoginInput.Password;

emailTxt.Click();
Delay.Milliseconds(0);			
emailTxt.PressKeys(uemail);
Delay.Milliseconds(0);			
			
passwordTxt.Click();
Delay.Milliseconds(0);
passwordTxt.PressKeys(upassword);
Delay.Milliseconds(0);
Any help on how I can fix this? Thanks!!!!!

IvanF
Posts: 151
Joined: Thu Aug 11, 2022 8:55 pm

Re: execution does not use value of input data driven parameter

Post by IvanF » Mon Apr 03, 2023 2:26 pm

Hi, could you please add a step that prints the value of uemail to the console/report (not the application itself)? That could help determine whether the issue is
- the script tries to pass an empty value, but the field autocompletes because of the dropdown behavior you mentioned
or
- the script sees the Excel cell as non-empty for some formatting reason

if it's the first one, maybe you can try SetValue instead of PressKeys