Comments (13)
I'm keen for feedback here. /cc @bobsilverberg, @justinpotts, @codingjoe
from pytest-selenium.
I think it would be great to offer most options as an environment variable (security) or pytest-conf variable as well.
from pytest-selenium.
All command line options should be able to be set using PYTEST_ADDOPTS environment variable, however I agree that it's nice to have dedicated variable names for most. What is the pytest-conf you mention, is that a plugin (I couldn't find it).
from pytest-selenium.
--driver - leave this as it is for now, but I'd like to have a local default - we could potentially determine which browsers are present and conveniently pick one. I don't think we should assume the user will have a Selenium server running
Second thoughts on this, I don't think we can expect users to have any of the drivers available - the only one that's convenient at the moment is Firefox but in the future this will be a separate download like the others. Maybe we should just remove the default value, and prompt the user with a list of valid drivers if the value is omitted.
from pytest-selenium.
@davehunt nope, there isn't a pytest-conf, I was talking about PYTEST_ADDOPTS
.
from pytest-selenium.
@davehunt I like all of your suggestions. The only one I'd question is --build
as I actually sometimes use that locally so I can easily identify my own tests running at Saucelabs. I wouldn't want to have to set an environment variable for that for a local run, although I certainly could if need be. Do you feel that one is important to remove?
from pytest-selenium.
@davehunt I like all of your suggestions. The only one I'd question is --build as I actually sometimes use that locally so I can easily identify my own tests running at Saucelabs. I wouldn't want to have to set an environment variable for that for a local run, although I certainly could if need be. Do you feel that one is important to remove?
Well, it's just that it's related to Sauce Labs (or CI) and not Selenium. It just feels like this plugin is the wrong place for it. I think I could probably be convinced, but maybe there's a better solution out there?
from pytest-selenium.
@davehunt Valid point, although that doesn't really address the fact that you suggested making it available via an environment variable. Would the plugin still do something with that env var, or would its existence just work and bypass the plugin?
from pytest-selenium.
To be honest I'm looking for suggestions. There's some missing context from a discussion with @justinpotts:
This is currently only used in saucelabs.py, I was going to suggest pull it out of the environment there, but I think it could be messy. Maybe leave this one for now.
Here's the code:
https://github.com/davehunt/pytest-selenium/blob/master/pytest_selenium/cloud/saucelabs.py#L58
Aha, and there's the solution, let's just remove it and document using --capability=build:${VARIABLE}
from pytest-selenium.
@davehunt So we'll just take out --build, and then they will use that --capability option to specify which build to use?
from pytest-selenium.
Yeah, I like that!
from pytest-selenium.
@davehunt In --sensitiveurl, it's already being specified from an environment variable. Were you thinking to change it to something different?
https://github.com/davehunt/pytest-selenium/blob/master/pytest_selenium/safety.py#L17
from pytest-selenium.
Ah, awesome - that's fine as it is then.
from pytest-selenium.
Related Issues (20)
- Move to Github Actions/CircleCI HOT 2
- Add deploy/publish to Github Actions HOT 1
- Add cron-job to run all tests once a day HOT 1
- DeprecationWarnings on selenium 4 HOT 13
- Error trying to run tests using Edge HOT 13
- Is this project dead? HOT 3
- TypeError when trying to gather logs (SauceLabs / IE) HOT 2
- Support for custom driver initialization and webdriver manager HOT 8
- Dependency conflict with pytest and selenium HOT 9
- pytest ignores driver selection HOT 3
- Unable to find handler for (POST) /wd/hub/session HOT 2
- Add support to pytest>=7.2.0 HOT 9
- desired capabilities causes error HOT 10
- urllib : TypeError: Cannot mix str and non-str arguments HOT 1
- Missing dependency on `py` package HOT 10
- TypeError when upgrading to selenium 4.10 HOT 2
- Error when running tests using Firefox and pytest-selenium 4.0.2 HOT 1
- Compatibility with pytest 8.0
- `Screenshot` doesn't match with `HTML` HOT 7
- Scope 'session' and 'module' doesn't work on fixture with browser initialization HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-selenium.