Giter Club home page Giter Club logo

Comments (13)

davehunt avatar davehunt commented on September 7, 2024

I'm keen for feedback here. /cc @bobsilverberg, @justinpotts, @codingjoe

from pytest-selenium.

codingjoe avatar codingjoe commented on September 7, 2024

I think it would be great to offer most options as an environment variable (security) or pytest-conf variable as well.

from pytest-selenium.

davehunt avatar davehunt commented on September 7, 2024

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.

davehunt avatar davehunt commented on September 7, 2024

--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.

codingjoe avatar codingjoe commented on September 7, 2024

@davehunt nope, there isn't a pytest-conf, I was talking about PYTEST_ADDOPTS.

from pytest-selenium.

bobsilverberg avatar bobsilverberg commented on September 7, 2024

@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 avatar davehunt commented on September 7, 2024

@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.

bobsilverberg avatar bobsilverberg commented on September 7, 2024

@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.

davehunt avatar davehunt commented on September 7, 2024

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.

justinpotts avatar justinpotts commented on September 7, 2024

@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.

davehunt avatar davehunt commented on September 7, 2024

Yeah, I like that!

from pytest-selenium.

justinpotts avatar justinpotts commented on September 7, 2024

@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.

davehunt avatar davehunt commented on September 7, 2024

Ah, awesome - that's fine as it is then.

from pytest-selenium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.