Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait()/waitFor() hangs test #12

Open
ryanzec opened this issue Oct 7, 2013 · 2 comments
Open

wait()/waitFor() hangs test #12

ryanzec opened this issue Oct 7, 2013 · 2 comments
Assignees
Labels

Comments

@ryanzec
Copy link
Contributor

ryanzec commented Oct 7, 2013

Both wait() and waitFor() are hanging the tests for me. I am using the canary builds and tried both chrome and phantomjs.

Here is my test for waitFor():

'test': function(test) {
    test.open('http://www.example.com')
    waitFor(function() {
        return true;
    })
    .waitForElement('.desktop-page')
        .assert.visible('.desktop-page', 'main page element is displayed')
        .assert.text('.desktop-page', 'Welcome.', 'has page text')
    .done();
}

The output for this is

$ dalek dalek/desktop.js -b chrome -l 5
Running tests
☁ [SYSTEM] dalek-internal-driver: Loading driver: "native"
☁ [SYSTEM] dalek-browser-chrome: Started ChromeDriver
Running Browser: Google Chrome
☁ [WEBDRIVER] webdriver: 303 POST /wd/hub/session
☁ [WEBDRIVER] webdriver:
☁ [WEBDRIVER] webdriver: 200 POST /wd/hub/session/0dd0896e30367855c2dff3812ab109dc/window/current/size
☁ [WEBDRIVER] webdriver: {"sessionId":"0dd0896e30367855c2dff3812ab109dc","status":0,"value":null}
☁ [WEBDRIVER] webdriver: 200 GET /wd/hub/status
☁ [WEBDRIVER] webdriver: {"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Mac OS X","version":"10.8.5"}}}
OS: Mac OS X 10.8.5 x86_64
☁ [WEBDRIVER] webdriver: 200 GET /wd/hub/session/0dd0896e30367855c2dff3812ab109dc
☁ [WEBDRIVER] webdriver: {"sessionId":"0dd0896e30367855c2dff3812ab109dc","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.3"},"cssSelectorsEnabled":true,"databaseEnabled":true,"handlesAlerts":true,"javascriptEnabled":true,"locationContextEnabled":true,"nativeEvents":true,"platform":"Mac OS X","rotatable":false,"takesScreenshot":true,"version":"30.0.1599.69","webStorageEnabled":true}}
Browser Version: 30.0.1599.69
>> WARNING: done not called!

RUNNING TEST - "test"
☁ [WEBDRIVER] webdriver: 200 POST /wd/hub/session/0dd0896e30367855c2dff3812ab109dc/url
☁ [WEBDRIVER] webdriver: {"sessionId":"0dd0896e30367855c2dff3812ab109dc","status":0,"value":null}
▶ OPEN http://www.example.com
✔ 0 Assertions run
✔ TEST - "test" SUCCEEDED

It just hangs there.

This is the test for the wait() method:

'test': function(test) {
    test.open('http://www.example.com')
    .execute(function() {
        var a = 1 + 2;
        return true;
    })
    .waitForElement('.desktop-page')
        .assert.visible('.desktop-page', 'main page element is displayed')
        .assert.text('.desktop-page', 'Welcome.', 'has page text')
    .done();
}

The output for this is:

$ dalek dalek/desktop.js -b chrome -l 5
Running tests
☁ [SYSTEM] dalek-internal-driver: Loading driver: "native"
☁ [SYSTEM] dalek-browser-chrome: Started ChromeDriver
Running Browser: Google Chrome
☁ [WEBDRIVER] webdriver: 303 POST /wd/hub/session
☁ [WEBDRIVER] webdriver:
☁ [WEBDRIVER] webdriver: 200 POST /wd/hub/session/339b34ea7553d302603101be54dc2601/window/current/size
☁ [WEBDRIVER] webdriver: {"sessionId":"339b34ea7553d302603101be54dc2601","status":0,"value":null}
☁ [WEBDRIVER] webdriver: 200 GET /wd/hub/status
☁ [WEBDRIVER] webdriver: {"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Mac OS X","version":"10.8.5"}}}
OS: Mac OS X 10.8.5 x86_64
☁ [WEBDRIVER] webdriver: 200 GET /wd/hub/session/339b34ea7553d302603101be54dc2601
☁ [WEBDRIVER] webdriver: {"sessionId":"339b34ea7553d302603101be54dc2601","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.3"},"cssSelectorsEnabled":true,"databaseEnabled":true,"handlesAlerts":true,"javascriptEnabled":true,"locationContextEnabled":true,"nativeEvents":true,"platform":"Mac OS X","rotatable":false,"takesScreenshot":true,"version":"30.0.1599.69","webStorageEnabled":true}}
Browser Version: 30.0.1599.69

RUNNING TEST - "test"
☁ [WEBDRIVER] webdriver: 200 POST /wd/hub/session/339b34ea7553d302603101be54dc2601/url
☁ [WEBDRIVER] webdriver: {"sessionId":"339b34ea7553d302603101be54dc2601","status":0,"value":null}
▶ OPEN http://www.example.com
☁ [WEBDRIVER] webdriver: 200 POST /wd/hub/session/339b34ea7553d302603101be54dc2601/execute
☁ [WEBDRIVER] webdriver: {"sessionId":"339b34ea7553d302603101be54dc2601","status":13,"value":{"message":"unknown error: __SCRIPT is not defined\n  (Session info: chrome=30.0.1599.69)\n  (Driver info: chromedriver=2.3,platform=Mac OS X 10.8.5 x86_64)"}}

It just hangs there (but at least with this case, there is an error in the system log).

@asciidisco
Copy link
Member

I see. It should work in stable, this is caused by a refactoring I´ve done recently. Will fix that probably tomorrow in canary.

@ghost ghost assigned asciidisco Oct 7, 2013
@vladsoroceanu
Copy link

Hi,

My waitFor test hangs too. I am using dalekjs cli v 0.0.4 and dalekjs local 0.0.8.
Tried with chrome and phantomjs and just stays there, nothing happen unless I brake the script manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants