Which of the following code snippet is an alternate to its Selenium code?

driver.findElement(By.id("body_txtPassword")).sendKeys("don@123");

page.locator("id=body_txtPassword").fill("don@123");
page.locator("id=body_txtPassword").send("don@123");
page.findElement("id=body_txtPassword").fill("don@123");
page.locator("id=body_txtPassword").fillKeys("don@123");
Verified Answer
Correct Option - a

To get all Infosys Certified Playwright Java Automation Tester Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram