saucelabs-training / demo-python Goto Github PK
View Code? Open in Web Editor NEWA repository containing all Python examples for Sauce
License: MIT License
A repository containing all Python examples for Sauce
License: MIT License
I ran into the following error:
ERROR: Cannot install -r requirements.txt (line 3) and selenium==4.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested selenium==4.0.0
appium-python-client 2.0.0rc2 depends on selenium==4.0.0.rc2
Updating my local copy of requirements.txt to "selenium==4.0.0.rc2" resolved the issue.
Currently, this project uses Pipenv to manage pip and virtual environments together. While Pipenv has some benefits, the project has largely been sunsetted. This suggests three options:
This is a smallish Python project that doesn't require any packages to be published nor does it have regular "builds" of an application.
Personally, I'm in favour of 1, but I'd like to see what other folks think!
So far there are only two test cases for RDC, valid login and invalid login (seen under appium-examples/pytest for example)
Since in the web app case there are test cases for adding and removing items to a user's cart, it would be good to have analogous cases for the native mobile case. This could be a good way for someone to contribute to this project and learn some PyTest and/or some Appium testing in Python.
Issue:
Sauce Labs is using sauce:options
to tell the VM's to start a W3C session, but the rest of the capabilities need the have the proper W3C names (See also https://wiki.saucelabs.com/display/DOCS/W3C+Capabilities+Support).
The capabilities in this file are not correct, https://github.com/saucelabs-training/demo-python/blob/master/selenium-examples/pytest/conftest.py#L27
The default on-boarding script gives an error when run with proper username and access key.
Only after changing the default URL to proper data center (eg. https://ondemand.eu-central-1.saucelabs.com:443/wd/hub
) the script runs properly.
The error with default URL:
$ python3 onboard.py
Traceback (most recent call last):
File "onboard.py", line 30, in <module>
driver = webdriver.Remote(command_executor=remote_url, desired_capabilities=desired_cap)
File "/Users/grzekorzkapkowski/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Users/grzekorzkapkowski/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Users/grzekorzkapkowski/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Users/grzekorzkapkowski/Library/Python/3.8/lib/python/site-packages/selenium/webdriver/remote/errorhandler.py", line 208, in check_response
raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: Uh oh, you've run out of minutes!
Please visit https://saucelabs.com/pricing to purchase a subscription.
Hi. I dont believe this is working. I copied the code and pasted it on a conftest.py file. I tried running it using my own saucelabs credentials and received a PluginValidation error:
File "c:\users\asalas008\desktop\vscode\awt\awt.venv\lib\site-packages\pluggy\manager.py", line 252, in _verify_hook
raise PluginValidationError(
pluggy.manager.PluginValidationError: Plugin 'C:\Users\asalas008\Desktop\VSCode\awt\awt\conftest.py' for hook 'pytest_runtest_protocol'
hookimpl definition: pytest_runtest_protocol(item, nextitem, driver)
Argument(s) {'driver'} are declared in the hookimpl but can not be found in the hookspec
What could I be doing wrong? I pretty much copied and paste the code.
Whilst you can use Robotframework with SeleniumLibrary and Sauce Labs by themselves, a good plugin library called robotframework-saucelabs is suggested. The robot examples in this project could be revised with this new library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.