0

my goal is to enter a username and password into the popup box that appears whenever the page loads. I am using selenium for this task and so far everything that I have tried does not work

I tried using this but it still does not open browser.get("http://username:password@websitecom");

this is my first time working with selenium! picture of the popup

google_p
  • 1
  • 1
  • Possible duplicate of [How to valid a login page using Java and Selenium WebDriver?](https://stackoverflow.com/questions/22614290/how-to-valid-a-login-page-using-java-and-selenium-webdriver) – Tarun Lalwani Aug 21 '17 at 20:00
  • I need a solution in javascript! – google_p Aug 21 '17 at 21:15
  • Understand that you need to find element and then take actions on them. That is how it works in selenium. Now come up with code that does that and if there are issues then ask those specific question. The link was not for a solution, but for direction as to how things work in Selenium – Tarun Lalwani Aug 21 '17 at 21:20

1 Answers1

0

Try this Website as a reference to solve your problem:

https://www.guru99.com/execute-javascript-selenium-webdriver.html

iamsankalp89
  • 4,607
  • 2
  • 15
  • 36