Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    mendhak
    @mendhak
    Similar for chrome, just using the selenium standalone. So not having to worry about the driver
    RoyceTheBiker
    @RoyceTheBiker_gitlab
    Thanks @mendhak. I see your base is node, I don't think my problem is in node. I think the problem is that I am trying to do too much in one docker image. I chose Debian so that I could run Chrome and Firefox in one image and node for the most part works just fine. I think Chrome and Firefox should be in Debian with smashtest and webdriver in another. I will use docker-compose to connect them and see if that works better.
    Craig Waite
    @craigvl
    I find that I am often wanting to await a whole list of props for the "on page x" steps, would it be good to have a method that you could just call that would just apply await $$(prop) for all the props ? Does that make sense? Could just add as an enhancement on GitHub?
    Peter Tesler
    @vptes1
    Not sure what you mean @craigvl You can always list multiple props inside a single $() or $$() (and use any order if they're not in order).
    Maybe give an example?
    Craig Waite
    @craigvl
    * On home page {
            props({
                'contactUs': 'a[href*="contact"]',
                'joinIn': 'a[href*="join-in"]',
                'siteMap': 'a[href*="site"]',
                'legals': 'a[href*="legals"]',
                'privacy': 'a[href*="privacy"]'
            });
    
           await allProps();
        }
    RoyceTheBiker
    @RoyceTheBiker_gitlab
    I have Smashtest working in Docker with Chrome and Firefox. Tests can be run via SSH. Next weekend I am going to look at adding a frontend WSI to upload and manage tests from the browser.
    smashtestio/smashtest#59 has been submitted.
    Peter Tesler
    @vptes1
    @RoyceTheBiker_gitlab Thank you!

    @craigvl I'd recomment this:

    * On home page {
        await $(`
            a[href*="contact"]
            a[href*="join-in"]
            a[href*="site"]
            a[href*="legals"]
            a[href*="privacy"]
        `);
    }

    Or

    * On home page {
        props({
            'contact us': 'a[href*="contact"]',  // I always prefer non-camel case :)
            'join in': 'a[href*="join-in"]',
            'site map': 'a[href*="site"]',
            'legals': 'a[href*="legals"]',
            'privacy': 'a[href*="privacy"]'
        });
    
        await $(`
            contact us
            join in
            site map
            legals
            privacy
        `);
    }
    Craig Waite
    @craigvl
    Great thanks.
    Peter Tesler
    @vptes1
    :thumbsup:
    slowmonkey
    @slowmonkey
    @RoyceTheBiker_gitlab are you able to explain the difference in approach with what you've provided vs what @mendhak posted? I'm a little confused.
    RoyceTheBiker
    @RoyceTheBiker_gitlab
    @mendhak has a separate container for the testserver and another for firefox. The problem I was having was with Chrome. My QA team uses Chrome mostly so I really wanted a solution that could do Chrome. @mendhak's solution uses prebuilt node and firefox, so there is a lot less downloading of packages. They could be smaller in size as they are optimized for the specific task. I chose Debian because I plan to expand on the tool and give it a management frontend so that QA staff can use the tool without needing to be experts on comand line.
    RoyceTheBiker
    @RoyceTheBiker_gitlab
    @slowmonkey the docker setup that @mendhak provided is a different approach. I thought about splitting my setup into multiple containers, there are some reasons to do that. I could revisit that later.
    mendhak
    @mendhak

    @RoyceTheBiker_gitlab Selenium provides a selenium/standalone-chrome:latest image as well, I use that for Chrome tests.

    I think the difference is, my approach is focused on CI/CD running and running headless locally.
    Your container seems focused on providing a managed tool to QA people so they don't have to worry about what docker is. I wouldn't use that on a CI server though, as you said before, it's doing too much.

    RoyceTheBiker
    @RoyceTheBiker_gitlab
    @mendhak the selenium-chrome image would be cool. I think it would solve the memory issue with Chrome, but also introduce a problem of not being able to run Chrome and Firefox tests from the same smash set, maybe. Someone with more selenium experience then myself would know.
    RoyceTheBiker
    @RoyceTheBiker_gitlab
    I think the next thing I want to do is connect to the Docker using Jenkins.
    mendhak
    @mendhak
    Yeah to do browsers together you essentially need a Selenium Hub. I've been looking at running Selenium Grid in ECS: https://code.mendhak.com/selenium-grid-ecs/
    Snoopiisz
    @Snoopiisz_twitter
    Hi guys, i heve a question, i need to import test in other file test with special path like this :
    image.png
    have you some solution for import test in other test with out use smashtest + path command ?
    Peter Tesler
    @vptes1
    @Snoopiisz_twitter I would advise going into /Tests and running smashtest --recursive
    In smashtest there is no importing. You just have to include the files you want to run in the smashtest command.
    Snoopiisz
    @Snoopiisz_twitter
    ok thanks :) i found a solution, for running 1,2,3 or more test i juste make a script python for regroupe all .smash in the temporary .smash and run it, with this methode i can choose test i want run with a big recursive project
    snoopiisz
    @snoopiisz
    why choose python? because it is much simpler and faster just to read the files in recursive mode.
    File management is also done much faster, especially on fairly large volumes.
    I also find it much easier & faster to integrate python into a CI / CD routine than nodeJS.
    Craig Waite
    @craigvl

    I think that you have mentioned this before but I am unable to find in the doco.

    I have a test that sets a username and password and don't want these values to show in the report?

    Peter Tesler
    @vptes1
    @craigvl You can use the +? modifier to hide the whole step from the report, or make it a step with a code block and set the password from the code block
    Craig Waite
    @craigvl
    Thanks
    simonhorner
    @simonhorner
    Hi, can anyone tell me how I can set the class(Name) on an element?
    Marton Sari
    @sarimarton
    You can use webdriver code (though I wonder why you want to do that)
    simonhorner
    @simonhorner
    Thanks, I'm trying to implement a test for file upload. I've tried to interact with the file browser but couldn't find a way. I want to add a class to make the file path input textbox visible so I can enter the filename in it.
    Morgan Leroux
    @MrGlox
    Hi guys ! First of all, Thanks for your amazing testing solution ! I just have some struggle with the tab key press gestion, you have already [enter] but I can't found something reladted with others keys
    Peter Tesler
    @vptes1
    @MrGlox There's a link in the documentation to https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Key.html [tab] should work as well
    Morgan Leroux
    @MrGlox
    Alright, didn't know about that ! I tried something alike by reflex, maybe I was wrong somewhere but I now I can be sure it will works. Thanks !
    snoopiisz
    @snoopiisz
    I guys, i think the color of reporting is no readable for CI/CD darkgrey on black not good, we can change this color ? why no white color ?
    Peter Tesler
    @vptes1
    @snoopiisz you can always submit a pull request for allowing users to customize the background color of the report. The majority of devs/testers prefer a dark theme which is why we went with that.
    shibupanda
    @shibupanda
    Can I get doc for config.json setup for smashtest
    shibupanda
    @shibupanda
    Is there any plan to support Appium keywords?
    How can I override default timeout for steps? Where to add that.
    Peter Tesler
    @vptes1
    @shibupanda
    1. The first section of https://smashtest.io/running-tests/command-line-options has info on the config file, smashtest.json
    2. In the future, yes. Feel free to kickstart this by submitting a pull request of your own! :)
    3. See setStepTimeout() at the bottom of https://smashtest.io/language/code-reference
      e.g.,
      Do initializations {
       setStepTimeout(100);
      }
       Open Chrome   // this step and anything after it will timeout after 100 secs
    shibupanda
    @shibupanda
    Thanks @vptes1
    Definitely I love to contribute
    Morgan Leroux
    @MrGlox
    Hi ! How can I test a file download in smashtest ? The interaction is just a click but is there a way to listen to a download process ?
    Morgan Leroux
    @MrGlox
    Also, is there a way to trigger non parallel tests in only one step ? After a login for example I want many tests started
    Peter Tesler
    @vptes1
    I don't think webdriver can track a download like that @MrGlox
    And not sure what you mean by your second ques sorry
    Morgan Leroux
    @MrGlox

    Alright for first.

    For the second :

    - Global start !!
    
        Init session
            Change language
            Auth tests
            Access register
            Register
    
        Init session
            Load env
                Login
    I want to execute only the first init and have all others in parallel then the second part executed in parallel after login. But actually with the good configuration, the tests are only playing one by one in any cases.
    Peter Tesler
    @vptes1
    Sorry I don't think I understand. Can you list the steps from the example above in the order you'd like them to execute?