Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:14
    ablok commented #5909
  • 18:56
    ablok ready_for_review #5909
  • 18:56
    ablok synchronize #5909
  • 18:54
    ablok synchronize #5909
  • 17:22
    mittalv3 commented #5040
  • 17:20
    mittalv3 commented #5040
  • 17:19
    mittalv3 commented #5040
  • 17:12
    christian-bromann commented #5923
  • 16:31
    AlmogH commented #5923
  • 16:07
    christian-bromann closed #6017
  • 16:07
    christian-bromann commented #6017
  • 16:04
    christian-bromann commented #5923
  • 15:52
    DeepTom commented #5923
  • 15:51
    DeepTom commented #5923
  • 14:50
    jsf-clabot commented #5923
  • 14:50
    AlmogH synchronize #5923
  • 14:39
    razielron opened #6017
  • 14:29

    christian-bromann on master

    Tracking doc: rewrite `@wdio/st… (compare)

  • 14:29
    christian-bromann closed #5922
  • 14:29
    christian-bromann labeled #5922
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
yes, but doesn't it run per every test or so?
perhaps I interpret it wrong, maybe it's indeed exactly what I need
Christian Bromann
@christian-bromann
nope .. it runs once before it starts running all tests
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
ah cool
thanks
Christian Bromann
@christian-bromann
see it like: onPrepare -> session gets created -> before -> test1 -> test2 -> test3 -> after -> session gets closed -> onComplete
in your test spec you can define a before hook that runs before each spec within the test
This message was deleted
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
ah simples
I am working on incorporating selenium-standalone.start and kill into 'prepare' and 'onComplete', like discussed yesterday. I am capturing the child process in onPrepare, and then .kill() it in onComplete. The killing works fine, the browser window dissapears, but for some reason this leaves the whole execution hanging, i.e. the whole wdio command never finishes.
should I kill it somehow more gracefully?
csoete
@csoete
maybe try calling end(); on the browser/client object?
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
oh sorry, it doesn't even reach 'onComplete'
Christian Bromann
@christian-bromann
the wdio runner calls end for you…I will probably remove these commands so people can’t mess around with it
"oh sorry, it doesn't even reach ‘onComplete’” why is that?
only reason I can think of is that one test never finished
csoete
@csoete
if I would use the client without any testrunner wouldn't I need the end() call?
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
@christian-bromann 'only reason I can think of is that one test never finished' - ah could be. I did tinker with the test
but now I see I never called the kill
and I'm now only trying to do it, but I'm having a hard time with it.
Not sure what I should kill, and how to passit around from onPrepare to onComplete
I thought that just assigning a global 'seleniumStandaloneChild' variable in: seleniumStandalone.start({}, function (err, child) { seleniumStandaloneChild = child; })
I will be able to access it in onComplete
Christian Bromann
@christian-bromann
@csoete the runner takes care of initialising and ending the selenium session, without it you have to do it by yourself
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
but it seems to be null in the 'after'
csoete
@csoete
@christian-bromann I undestand, just wondering because you just wrote that you want to remove the method. But if you are using the driver standalone it would be required. Just confused.
Christian Bromann
@christian-bromann
@csoete sorry about that. I would only remove it if someone uses the wdio test runner
csoete
@csoete
ah ok
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
aha! It seems that what I assign in 'onPrepare:' is not visible in onComplete!
do they run in some separate memory or so?
or am I missing out some obvious node.js workings
how can I pass a value between onPrepare and onComplete?
Christian Bromann
@christian-bromann
@slawomir-brzezinski-at-travcorp I guess you need to assign the child process to a global variable like: GLOBAL.seleniumStandalone = selenium.start ...
slawomir-brzezinski-at-travcorp
@slawomir-brzezinski-at-travcorp
@christian-bromann . I tried that to no-avail. Maybe I'm missing something obvious
but to be precise, from the docs, I only have access to the process to kill in callback to start - like here: https://github.com/vvo/selenium-standalone#seleniumstartopts-cb
and over there, in the callback, if I do child.kill(), it works
but that's obviously premature :)
it seems like that runs in some separate scope/memory
Tony Keith
@onewithhammer

I'm using grunt + grunt-webdriver + saucelabs + sauceconect. When I run 1 file everything works file but when I try to run 2 files for same I get the following error:
`Running "webdriver:ieexample" (webdriver) task

Grunt Saucelabs Test for Web Driver IO - Tutorial Test Page Website

✓ should be load correct page and title (2499ms)

Title Test for Web Driver IO - Tutorial Test Page Website

✓ should be load correct page and title (1141ms)

Copyright Test for Web Driver IO - Tutorial Test Page Website

1) should be load correct page and title

2) should contain Copyright text

3) should contain Copyright text

2 passing (5s)

3 failing

1) Copyright Test for Web Driver IO - Tutorial Test Page Website should be load correct page and title:

 Uncaught RuntimeError

 Problem: The command you just sent (POST url) has no session ID.

This is generally caused by testing frameworks trying to run commands after the conclusion of a test.

For example, you may be trying to capture a screenshot or retrieve server logs after selenium.stop() or driver.quit() was called in a tearDown method.

Please make sure this process happens before the session is ended.

 Callstack:

-> url("http://www.tlkeith.com/WebDriverIOTutorialTest.html")
`

Tony Keith
@onewithhammer
Nevermind...I found the issue
Christian Bromann
@christian-bromann
cool
just read the text
hellis007
@hellis007
ERROR: Cannot read property 'expectationResultHandler' of undefined
browserName: "chrome". I extremely new to this project and was wondering if I could some assistance with the following error. I'm trying to run jasmine from the wdio.conf.js file I getting the following error. I tried changing the browserName to Firefox and even phantomJS. I'm sure it's something simple I'm missing. Any help would be greatly appreciated. Thanks
Christian Bromann
@christian-bromann
interesting, you pointed out a bug .. I am gonna file an issue
please add jasmineNodeOpts to your wdio conf
even if it is an empty object
hellis007
@hellis007
ok, will do. let me give it a try! thanks
worked like a charm! my test runner is going through fine.
Christian Bromann
@christian-bromann
issue created webdriverio/webdriverio#691
hellis007
@hellis007
thanks christian