The homepage for the web application I'm testing has a loading screen when you first load it, then a username/password box appears. It is a dynamically generated UI element and the cursor defaults to being inside the username field.
I looked around and someone suggested using action chains. When I use action chains, I can immediately input text into the username and password fields and then press enter and the next page loads fine. Unfortunately, action chains are not a viable long-term answer for me due to my particular setup.
When I use the webdriver's "find_element_by_id" I am able to locate it. I am not able to "send_keys" to the element though because it supposedly is not visible. I receive
"selenium.common.exceptions.ElementNotVisibleException: Message: element not visible".
I'm also not able to click the field or otherwise interact with it without getting this error.
I have also tried identifying and interacting with the elements via other means, such as xpaths and css, to no avail. They are always "not visible".
Strangely, it works with dynamic page titles. When the page first loads it is "Loading..." and when finished it is "Login". The driver will return the current title when driver.title is called.
Does anyone have a suggestion?
Aucun commentaire:
Enregistrer un commentaire