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:29 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!!!!!

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

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

Post by Stub » Mon Apr 03, 2023 12:15 pm

The steps I use to input email addresses are:

1. Ensure the control is visible: EnsureVisible()
2. Clear out any contents on the field already: SetAttributeValue("Value", "")
3. Click to activate.
4. PressKeys to type in my value.
5. PressKeys "{Tab}" to move away from the field.