Issue
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support.ui import WebDriverWait
Since I started using Selenium I've always used ui
and I've always seen others using ui
too, but I'm not finding it in the Selenium documentation and now Pylance is showing this alert:
"WebDriverWait" is not exported from module "selenium.webdriver.support.ui"
Import from "selenium.webdriver.support.wait" instead
Both seem to work, but I didn't find anything warning about which one will become obsolete or anything like that. I would like to understand better what is behind this subject!
Solution
As per the official documentation, you have to use:
from selenium.webdriver.support.wait import WebDriverWait
Refer:
https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.wait.html
Answered By - AbiSaran
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.