Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Peter Tesler
    @vptes1
    Also, new ElementFinder is an internal thing, intentionally not documented. You should try $() or $$() instead.
    Since you're using new ElementFinder, you probably need to explicitly set a counter, so...
    Craig Waite
    @craigvl
    ok gives same result but will change to $$ , thanks
    Peter Tesler
    @vptes1
    * 1+ x #PREFER option, any visibility
    Craig Waite
    @craigvl
    :thumbsup:
    Peter Tesler
    @vptes1

    So I would advise this...
    1) new ElementFinder() - only for internal stuff like unit tests for EF implementation, explicit counter is mandatory:

    * 1+ x #PREFER option, any visibility
        'text'
        etc.

    2) $() - matches single element, so I'm matching only the #PREFER here:

    #PREFER
        * option, any visibility
            'text'
            etc.
    `

    3) $$() - matches multiple elements, so I'm matching each option here:

    * #PREFER option, any visibility
        'text'
        etc.
    In the docs I always show #2. That's probably the "most standard" way of doing it, i.e., element array as a child to an element
    Craig Waite
    @craigvl
    If there was only one select on page with id=prefer then 2 and 3 are the same?
    Peter Tesler
    @vptes1
    Well, #2 is matching the select, #3 is matching the options.
    Craig Waite
    @craigvl
    Yep ok I see
    Craig Waite
    @craigvl
    all ok, each option needs, any visibility
    Peter Tesler
    @vptes1
    So what EF did you end up using?
    Craig Waite
    @craigvl
    await $$(`
                * #PREFER option, any visibility
                    '1 - Title, Publication' any visibility
                    '0 - Default' any visibility
                    '2 - Publication, Title' any visibility
                    '3 - Publication, Author' any visibility
                    '4 - Author, Publication' any visibility
                    '5 - Publication Descending' any visibility
                    '6 - Shelf Location' any visibility
                    '7 - Author, Title' any visibility
                `
                )
    Craig Waite
    @craigvl
    looking at the report-data.js file, what was the intended difference between, isPassed vs isFailed ?
    Peter Tesler
    @vptes1
    On steps, isPassed is set to true if the step passed, isFailed is set to true if the step failed, and neither are set if the step hasn't been run yet, got skipped, etc.
    Similar on branches
    Craig Waite
    @craigvl
    ok thanks
    Peter Tesler
    @vptes1
    Also, if a branch passed, steps inside of it without isPassed or isFailed are assumed to have passed. This is because if step-data is something other than "all", anything not essential will be deleted from a step obj.
    Craig Waite
    @craigvl
    ok that is good to know
    Craig Waite
    @craigvl

    Getting this error on mac

    Before Everything
    TypeError: Promise.race(...).finally is not a function   [/usr/local/lib/node_modules/smashtest/packages/browser.smash:5]
        at RunInstance.evalCodeBlock (/usr/local/lib/node_modules/smashtest/src/runinstance.js:933:21)
        at RunInstance.runHookStep (/usr/local/lib/node_modules/smashtest/src/runinstance.js:422:24)
        at Runner.runBeforeEverything (/usr/local/lib/node_modules/smashtest/src/runner.js:271:36)
        at Runner.run (/usr/local/lib/node_modules/smashtest/src/runner.js:99:27)
        at <anonymous>

    Is finally supported in es2015 ?

    Peter Tesler
    @vptes1
    That's weird. I've never gotten that. That's in nodejs code, and finally should be supported according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally
    What caused this error?
    Craig Waite
    @craigvl
    I will have to debug, just running tests that run on windows on mac. Will debug when I can and let you know.
    Peter Tesler
    @vptes1
    What version of nodejs do you have?
    Craig Waite
    @craigvl
    On the mac, 9.5.0, will update
    Peter Tesler
    @vptes1
    yea looks like Promise.finally() was only added to node after version 10, after it became a standard
    would be willing to bet the upgrade will solve this
    Craig Waite
    @craigvl
    yep fixed :0)
    Peter Tesler
    @vptes1
    👍
    GameOSX
    @GameOSX
    hi, I've got a little problem with starting smashtest - i'm starting webdriver-manager in separate terminal and when i type smashtest i'm getting this error (windows 10)
    Open Chrome
    Error: Server terminated early with status 1   [D:/Workspace/SmashTest/helloworld.smash:1]
        at C:\Users\Lenovo\AppData\Roaming\npm\node_modules\smashtest\node_modules\selenium-webdriver\remote\index.js:251:52
        at processTicksAndRejections (internal/process/task_queues.js:93:5)
    Peter Tesler
    @vptes1
    Hi - Did you run the command as smashtest --test-server= http://localhost:4444/wd/hub ?
    Or add test-server to your smashtest.json config file?
    Peter Tesler
    @vptes1
    ^ @GameOSX
    GameOSX
    @GameOSX
    yes I tried both
    Peter Tesler
    @vptes1
    Please provide steps to reproduce, i.e., what you're passing in to the command line, what's in your config file (if it exists), what's in your .smash file(s), the output of webdriver-manager, etc.
    Just from googling that error, it seems like an internal webdriver thing. You can try reinstalling webdriver, or use a different option on https://smashtest.io/getting-started/setup
    See if that helps
    GameOSX
    @GameOSX

    ok so i've reinstalled webdriver-manager and smashtest - nothing changed. my starting command is

    smashtest --test-server=http://127.0.0.1:4444/wd/hub

    my helloworld.smash:

    Open Chrome
    
        Navigate to 'google.com'
    
            Type 'hello world[enter]' into 'textbox'

    and output form webdriver manager:

    webdriver-manager: using global installed version 12.1.7
    [10:58:26] I/start - java -Dwebdriver.gecko.driver=C:\Users\Lenovo\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\geckodriver-v0.26.0.exe -Dwebdriver.chrome.driver=C:\Users\Lenovo\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\chromedriver_78.0.3904.105.exe -jar C:\Users\Lenovo\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.141.59.jar -port 4444
    [10:58:26] I/start - seleniumProcess.pid: 12056
    10:58:27.048 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
    10:58:27.146 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
    2019-12-05 10:58:27.195:INFO::main: Logging initialized @377ms to org.seleniumhq.jetty9.util.log.StdErrLog
    10:58:27.417 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
    10:58:28.011 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444

    so it looks like nothing is even trying to start chromedriver on selenium server.
    I've also tried all other setups - nothing is working for me :/
    Even if I'm trying to start Firefox - the same error.

    Peter Tesler
    @vptes1
    Have you tried running webdriver-manager update? How about using https://www.npmjs.com/package/selenium-standalone instead of webdriver-manager?
    What versions of chrome and node are you using?
    Peter Tesler
    @vptes1
    Also, if you're using a webdriver manager, you shouldn't set the SELENIUM_SERVER_JAR env variable, if you're doing that
    That's all I can think of atm
    GameOSX
    @GameOSX
    wow - selenium-standalone helped and now it's working :) thx @vptes1 for your help
    Peter Tesler
    @vptes1
    Good to hear!
    id7digital
    @id7digital
    hi guys, im having a bit of trouble with the command line smashtest arguments, --recursive does not seem to pick up any functions in subfolders in my directory
    smashtest folderpath/*.smash --recursive
    Peter Tesler
    @vptes1
    @id7digital Try running just smashtest --recursive (possibly also cding into folderpath)
    I believe --recursive overrides the path passed into the command
    Peter Tesler
    @vptes1
    Everyone, I've updated https://smashtest.io/getting-started/setup to recommend using selenium-standalone for windows users (as opposed to webdriver-manager). It seems that a number of you had trouble using webdriver-manager on windows, even though that's the most popular manager on npm. If you've had success with webdriver-manager, or trouble with selenium-standalone, please let me know. I'd love to get your feedback and update the site accordingly.
    id7digital
    @id7digital
    thanks @vptes1