Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import webdriver? #24864

Open
ghost opened this issue Aug 4, 2020 · 2 comments
Open

How to import webdriver? #24864

ghost opened this issue Aug 4, 2020 · 2 comments
Labels
help Requests for support

Comments

@ghost
Copy link

ghost commented Aug 4, 2020

In \wpt-master\webdriver\tests\support\asserts there is this script:

from webdriver import Element, NoSuchAlertException, WebDriverException

But there is no module called webdriver, atleast in tests.support.asserts

@gsnedders gsnedders added the help Requests for support label Aug 4, 2020
@gsnedders
Copy link
Member

There's… far too much magic with import paths in WPT. It assumes that tools/webdriver is on the path, which contains a webdriver package. I think otherwise it assume relatively "standard" things like pytest.

@stephenmcgruer
Copy link
Contributor

For completeness, in the case of wpt run it adds tools/webdriver to the path automatically by importing tools/localpaths.py (in tools/wpt/wpt.py), which sets up the python path with various libraries including pytest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help Requests for support
Projects
None yet
Development

No branches or pull requests

2 participants