For identifying lastname textbox and to perform input to this control we will identify this control with its AutomationId like
For identifying enterPassword textbox and to perform input to this control we will identify this control with its AutomationId like AutomationId="textBox4", and we can perform input by using enterPassword.SetValue("1234567890!@#$");
- TextBox confirmpassword = window.Get<TextBox>(SearchCriteria.ByAutomationId("textBox5"));
For identifying confirmpassword textbox and to perform input to this control we will identify this control with its AutomationId like AutomationId="textBox5", and we can perform input by using confirmpassword.SetValue("1234567890!@#$");
- ComboBox dropCountry = window.Get<ComboBox>(SearchCriteria.ByAutomationId("comboBox1"));
For identifying dropCountry dropdown and to perform input to this control we will identify this control with its AutomationId like AutomationId="comboBox1", and we can perform input by using dropCountry.Select("India");
- TextBox zipcode = window.Get<TextBox>(SearchCriteria.ByAutomationId("textBox6"));
For identifying zipcode textbox and to perform input to this control we will identify this control with its AutomationId like AutomationId="textBox6", and we can perform input by using zipcode.SetValue("500076");
- TextBox city = window.Get<TextBox>(SearchCriteria.ByAutomationId("textBox7"));
For identifying city textbox and to perform input to this control we will identify this control with its AutomationId like AutomationId="textBox7", and we can perform input by using city.SetValue("Hyderabad");
- ComboBox dropSecurityQuestion = window.Get<ComboBox>(SearchCriteria.ByAutomationId("comboBox2"));
For identifying dropSecurityQuestion dropdown and to perform input to this control we will identify this control with its AutomationId like AutomationId="comboBox2", and we can perform input by using dropSecurityQuestion.Select("What is the name of the company of your first job?");
- TextBox securityAnswer = window.Get<TextBox>(SearchCriteria.ByAutomationId("textBox8"));
For identifying securityAnswer textbox and to perform input to this control we will identify this control with its AutomationId like AutomationId="textBox8", and we can perform input by using securityAnswer.SetValue("XYZ Technologies");
- Button registerclick = window.Get<Button>(SearchCriteria.ByAutomationId("button1"));
For identifying registerclick button and to perform input to this control we will identify this control with its AutomationId like AutomationId="button1", and we can perform input by using registerclick.Click();
The above image shows the execution or automation of Windows applications while in debug mode.
Thanks & I hope this article helps you.