Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    peekyIL
    @pattarika
    stage('Test') {
    withCredentials([[$class: 'UsernamePasswordMultiBinding',
    credentialsId: 'accessTokenToAzureRepo',
    usernameVariable: 'USERNAME',
    passwordVariable: 'PASSWORD']]) {
    dir("${env.WORKSPACE}/SharePoint"){
    script{
    sh ("""docker exec -t sp pytest \
    --browser=remote --server selenium-hub --port 4444 \
    --cap_file=capabilities/firefox.py --headless \
    --log_path=tests/latest_logs --save_screenshot \
    --data=X_SITE_1,education,${USERNAME},${PASSWORD} \
    --verbose -k verify""")
    }
    }
    }
    sorry i don't know how to format the syntax
    Michael Mintz
    @mdmintz
    Sy
    @symonk
    @mdmintz I think when trying to click an element that isnt there etc, latest_logs writing to the file system doesnt work
    I get no latest_log files written to when my tests fails with: selenium.common.exceptions.ElementNotVisibleException
    --save_screenshot does indeed work
    Sy
    @symonk
    has_exception looks to be False in this instance
    (pytest)
    Michael Mintz
    @mdmintz
    @symonk Try upgrading to the latest version of SeleniumBase and try again. It was working for me just now.
    Sy
    @symonk
    are you using pytest? i think its related to that @mdmintz
    has_exception in base case is False, even tho this exception occured
    Sy
    @symonk
    (Pdb) has_exception False (Pdb) self.save_screenshot_after_test False (Pdb) has_exception False (Pdb) self.with_testing_base True
    no files in latest_logs
    Michael Mintz
    @mintzworld_twitter
    I could not reproduce on my build. I’m using pytest. I have the SeleniumBase pytest.ini file at the base of my repo. Not sure if you made any modifications that would alter that functionality.
    Sy
    @symonk
    quite likely, will just check - we have made some recently :) (cut the inheritance)
    leaving work in 15, will make a repeatable gist (if its not me being dumb) and open an issue
    peekyIL
    @pattarika
    @mdmintz i was able to get credential from jenkins into pytest using seleniumbase, thanks!
    Peter Nguyen Tr
    @PeterNgTr
    maybe someone knows how to skip setup method for a certain test in a test file. Let's say we have a test file that has 5 tests, but we want to run setup for 4 tests and skip it for a test. Do you have any lights to achieve this? Many thanks!
    Michael Mintz
    @mintzworld_twitter
    @PeterNgTr To skip setUp(), don’t put that test in a class that inherits BaseCase. Although then you won’t have any SeleniumBase functionality in that class, if that’s what you’re looking for.
    Sy
    @symonk
    @mdmintz how can we disable --with-testing-base? we want to handle our own screenshots etc
    Michael Mintz
    @mdmintz
    @symonk You can reduce logging, but not eliminate all of it. Add --with-basic_test_info on the command line to get any stack traces in latest_logs/, but not the screenshot or page source.
    Sy
    @symonk
    @mdmintz I opened an issue, curious on your thoughts - if you like it i can implement it
    Michael Mintz
    @mintzworld_twitter
    @symonk I’m already working on solutions to that and the PDF Chinese character export issue. Updates are slow this week due to Thanksgiving travel. Coincidentally, 3 new GitHub issue requests in the last 2 days, at a very busy time.
    Michael Mintz
    @mdmintz
    v1.33.8 and v1.33.9 are released. That takes care of all currently open issues.
    normalPerson123
    @normalPerson123
    Hey, I'm pretty new to Python, but I did a bunch of Java WebDriver stuff for a few years at my job. This is knocking my socks off. Is there any way I or anyone else can help you?
    Michael Mintz
    @mdmintz
    @normalPerson123 Let me know if you run into any issues. I'm quick on resolving them.
    Also, please spread the word about SeleniumBase! It's not as popular as other test frameworks out there, but that doesn't mean it's not better than them.
    normalPerson123
    @normalPerson123
    I'm already doing a project with it for work.
    I will try to spread it around.
    Michael Mintz
    @mdmintz
    Just added mobile device testing in SeleniumBase v1.34.0 - https://github.com/seleniumbase/SeleniumBase/releases/tag/v1.34.0
    normalPerson123
    @normalPerson123
    Hey, I want to centralize my url's and have different ones per environment. I spent some time messing with conftest.py files and had a tough time getting the fixtures tk work with my suite class. I noticed BaseTestCase.py in examples/Boilerplates. Should I just be reading a config file in the setup method?
    I feel like you've thought of this and I'm missing some really obvious pattern.
    Michael Mintz
    @mdmintz
    Hi @normalPerson123 , you can accomplish that by parsing files. I have an example of that here: https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates/file_parsing (see parse_files.py)
    You can use --env=qa to specify the qa environment, for example. (A separate feature)
    Built-in env options are qa, staging, production, develop, master, local, and test.
    If --env=ENV isn't enough, use --data=STRING to pass anything into the tests. Then use self.data to access that. (It's self.env to access the env variable during tests.)
    normalPerson123
    @normalPerson123
    Thanks!
    normalPerson123
    @normalPerson123
    I'm some trouble with typing in an input on an iframe. I can get it to work in one environment, but not another, so I decided to go with javascript execution, just document.getelementbyid("whatever").value = "something else" but that doesn't work in either env. Do I need to do anything other than switching iframes execute that javascript?
    normalPerson123
    @normalPerson123
    Nm. Nested iframe. Sorry
    Sy
    @symonk
    @mdmintz any idea what causes this?
    selenium.common.exceptions.TimeoutException: Message: timeout: Timed out receiving message from renderer: 10.000 (Session info: chrome=79.0.3945.79)
    maybe our seleniumbase version needs bumped to cope with chrome 79?
    Michael Mintz
    @mdmintz
    @symonk Are you using an old version of seleniumbase? You may want to use the latest one.
    Also try: seleniumbase install chromedriver latest
    Sy
    @symonk
    it was caused by selenium/elgalu docker repo being out of sync, i opened a PR that got merged yesterday so all good now
    Michael Mintz
    @mdmintz
    Great!
    Sy
    @symonk
    @mdmintz have you seen any issues with chrome 79? and SSL cert problems
    we updated yesterday and there is SSL cert issues, i think they possibly changed the behaviour
    Resolved issue 3148: ChromeDriver always ignores certificate errors [Pri-2]
    Michael Mintz
    @mdmintz
    So they already resolved it? Just use the latest Chromedriver where they resolved it then.
    Sy
    @symonk
    Hey no I think it’s broken with seleniumbase, we reverted to 78