Get a page with Selenium but wait for element value to not be empty [duplicate]

人走茶凉 提交于 2020-12-12 11:57:08

问题


I'm grabbing a web page using Selenium, but I need to wait for a certain value to load. I don't know what the value will be, only what element it will be present in.

It seems that using the expected condition text_to_be_present_in_element_value or text_to_be_present_in_element is the most likely way forward, but I'm having difficulty finding any actual documentation on how to use these and I don't know if they come before or after the page Get:

webdriver.get(url)

Linked answers to this both rely on knowing what the expected text value will be. In the first one, it explicitly shows the expected text hardcoded into the WebDriverWait call. Furthermore, neither of the linked answers even remotely touch upon the final part of my question:

[whether] they come before or after the page Get

来源:https://stackoverflow.com/questions/64975727/get-a-page-with-selenium-but-wait-for-element-value-to-not-be-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!