Newbie QA: How to remove the previous values and enter new values. [message #1830895] |
Thu, 06 August 2020 07:46 |
Ryan Escal Messages: 1 Registered: August 2020 |
Junior Member |
|
|
Hi I'm a newbie in using Eclipse and I want to learn more about creating of Automation script. I have a simple project on the Login page and I created basic codes and it works but what happened is continuous entering values in the field.
I need is every time to run each step will remove the previous values and enter new values.
Please see attached for the actual result.
This is the sample codes that I created.
@BeforeMethod
public void setup() {
System.setProperty("webdriver.chrome.driver", "C:\\sample path");
driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("sample url");
}
@Test
public void LoginPageDataTypeValidation() {
driver.findElement(By.xpath("/html/body/app-root/app-login/div/div/div[2]/div[2]/div/form/div[2]/div/input")).sendKeys("escalryan");
driver.findElement(By.xpath("/html/body/app-root/app-login/div/div/div[2]/div[2]/div/form/div[2]/div/input")).sendKeys("123456789");
}
}
Thanks!!
|
|
|
Powered by
FUDForum. Page generated in 0.03022 seconds