Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Newbie QA: How to remove the previous values and enter new values.(TestNG Script)
Newbie QA: How to remove the previous values and enter new values. [message #1830895] Thu, 06 August 2020 07:46
Ryan Escal is currently offline Ryan EscalFriend
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!!
Previous Topic:Tools and frameworks for the modern Java developer
Next Topic:junit plugin update within Eclipse IDE 2019.3
Goto Forum:
  


Current Time: Wed Oct 28 23:44:20 GMT 2020

Powered by FUDForum. Page generated in 0.01839 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top