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

Webdriverio / mocha test never executes hangs after client.init() #4

Open
andyjdee opened this issue Jul 26, 2018 · 2 comments
Open

Comments

@andyjdee
Copy link

andyjdee commented Jul 26, 2018

Hi,

I am trying to setup a webdriverio framework with mocha to test an OpenFin application. I've followed the instructions to the T from what's on the read me but the it() test never gets executed and seems to hang after the webdriver.remote(driverOptions).init() has been invoked.

The OpenFin app in test does open, i.e. the RunOpenFin.bat is executed and application opens successfully, but the test scenario it() is not executed and times out.

Any help would be greatly appreciated.

@andyjdee
Copy link
Author

After debugging the issue further, it seems the test is failing on the following.

Error: unknown error: unable to discover open pages
  (Driver info: chromedriver=2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 6.1.7601 SP1 x86_64)
    at new RuntimeError (.\node_modules\webdriverio\build\lib\utils\ErrorHandler.js:143:12)
    at Request._callback (.\node_modules\webdriverio\build\lib\utils\RequestHandler.js:316:39)
    at Request.self.callback (.\node_modules\request\request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (.\node_modules\request\request.js:1157:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (.\node_modules\request\request.js:1079:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

I think this might imply that chrome driver you have provided in the source is not compatible ?

@wenjunche
Copy link
Contributor

Hello

I just tried and it worked for me:

npm run testWIO

mocha test/WebDriverIO/Mocha/hello-openfin.js
Hello OpenFin App testing with webdriver.io
√ Switch to Hello OpenFin Main window (170ms) √ Wait for OpenFin API ready
√ Verify OpenFin Runtime Version (116ms)
√ Find notification button
√ Click notification button (88ms)
√ Find CPU Info button (379ms)
√ Click CPU Info button (3135ms)
√ Switch to CPU Info window (2453ms)
√ Find Exit button for CPU Info window
√ Click CPU Info Exit button (63ms)
√ Exit OpenFin Runtime (1003ms)

Are you using app.json from the example repo ? If not, what version# do you specify as runtime->version ?

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

No branches or pull requests

2 participants