Recently, I began my journey of learning selenium WebDriver. In an attempt to automate the task of logging into an account using the Firefox browser, I encountered a discrepancy.
Manually opening the browser and clicking on the login link from the homepage triggered a pop-up window to input login credentials. By capturing the elements with Firebug, I succeeded in completing the script with Java.
However, running the same script resulted in the browser navigating to a new page after clicking on the login link from the homepage instead of the expected pop-up window. The web element values for username, password, and login were different than those captured manually, leading to a 'NoSuchElementException'.
Why does this difference occur when launching the browser through selenium? How can we effectively handle these scenarios in a live environment?
I would greatly appreciate any assistance.
Thank you, Sri.