Home > Mobile >  python/slenium, wait till class value in html line changes
python/slenium, wait till class value in html line changes

Time:03-13

I am using selenium to create an email verifyer but I have to wait till a certain element loads, which is the input button, at the beginning its html is:

<input id="mail" type="text" onclick="select(this);" data-original-title="Your Temporary Email Address" data-placement="bottom" data-value="Loading"  readonly="">

and then the class changes from to :

<input id="mail" type="text" onclick="select(this);" data-original-title="Your Temporary Email Address" data-placement="bottom" data-value="Loading"  readonly="">

I want the code to wait for this specific class change, how can I achieve that?

site: https://temp-mail.org/en/

Thanks!

CodePudding user response:

Selenium sdk for python has Waits that can be used for this use case. There is even example with your specific use-case in official documentation:

https://selenium-python.readthedocs.io/waits.html. See: Custom Wait Conditions

  • Related