nightwatch.js

nightwatch.js internet explorer

让人想犯罪 __ 提交于 2020-01-05 21:05:03
问题 I'm using nightwatch for testing my javascript application. I need to be able to run cross-browser tests on local machine. Chrome and Firefox are OK, but when running test on IE, I got an error: Running: google.com TypeError: undefined is not a function at pass (C:\Users\Dávid\AppData\Roaming\npm\node_modules\nightwatch\lib\api\ assertions\urlContains.js:23:18) at Object.<anonymous> (C:\Users\Dávid\AppData\Roaming\npm\node_modules\night watch\lib\core\assertion.js:94:23) at HttpRequest.

nightwatch.js internet explorer

扶醉桌前 提交于 2020-01-05 21:04:08
问题 I'm using nightwatch for testing my javascript application. I need to be able to run cross-browser tests on local machine. Chrome and Firefox are OK, but when running test on IE, I got an error: Running: google.com TypeError: undefined is not a function at pass (C:\Users\Dávid\AppData\Roaming\npm\node_modules\nightwatch\lib\api\ assertions\urlContains.js:23:18) at Object.<anonymous> (C:\Users\Dávid\AppData\Roaming\npm\node_modules\night watch\lib\core\assertion.js:94:23) at HttpRequest.

Can Nightwatch be used to test Rails?

那年仲夏 提交于 2020-01-05 04:21:09
问题 A contractor for our startup installed the Selenium-based Nightwatch testing framework, since our stack is React-heavy. But he told me that it could even be used to test our Rails code. A new contractor said, to the contrary, that Nightwatch couldn't do unit tests of our Rails controllers and models (which makes sense to me). Who is right? Do you suppose the first programmer had in mind just that we would do end-to-end testing (certain inputs lead to certain outputs), and that we need not

Running multiple nightwatch instances

爷,独闯天下 提交于 2020-01-05 04:03:50
问题 At my current company, we have about 10 websites.. That all extend from a single codebase. Whenever we change something in the 'core' codebase, we want to run tests on all 10 websites in parallel. Its a lot easier in the cloud, but we also want to be able to do it locally. For this to happen, I basically start multiple Selenium instances, all with its own port, and set a different nightwatch launch_url for every instance So I made a NodeJS script.. That creates a nightwatch.json for every

Nightwatch, afterEach, browser.pause is not a function

ぃ、小莉子 提交于 2020-01-03 17:10:01
问题 I would like to make pause each test. I've create this function: afterEach:function(browser){ browser.pause(2000); }, But when I run tests, I will get error: TypeError: browser.pause is not a function Why ? In tests browser.pause is function. 回答1: The answer, provided by beatfactor, on the linked GitHub issue, is When using afterEach you need to use the done callback argument always if you want to use the browser object. That is for backwards compatibility. So you need to do either: afterEach

Nightwatch, afterEach, browser.pause is not a function

早过忘川 提交于 2020-01-03 17:09:15
问题 I would like to make pause each test. I've create this function: afterEach:function(browser){ browser.pause(2000); }, But when I run tests, I will get error: TypeError: browser.pause is not a function Why ? In tests browser.pause is function. 回答1: The answer, provided by beatfactor, on the linked GitHub issue, is When using afterEach you need to use the done callback argument always if you want to use the browser object. That is for backwards compatibility. So you need to do either: afterEach

Check if one of divs contains my values in nightwatch

醉酒当歌 提交于 2020-01-02 04:41:08
问题 I have problem with testing my webapp with nightwatch.js. I need to iterate over all div elements on the page to check if there is the one who contains all child elements I added before. For example I have: <div className = 'myclass'> <h2> text1 </h2> <h3> second_text1 </h3> </div> <div className = 'myclass'> <h2> text2 </h2> <h3> second_text2 </h3> </div> And I want to check if one of divs contains both: 'text2' and 'second_text2'. I tried to add iter function like here: Assert text value of

Use of Selenium for AngularJS based Web Applications

十年热恋 提交于 2020-01-01 03:38:07
问题 I have come to know that Selenium is the father of UI testing. Now my question is why then Angular team has developed Protractor. Can't the same job (that Protractor does) be done with Selenium for AngularJS based web applications? Further, people are talking about Nightwatch.js too. So why there are so many E2E testing libraries/frameworks like Protracor or Nightwatch. 回答1: Protractor combines powerful tools and technologies such as NodeJS, Selenium, webDriver, Jasmine, Cucumber and Mocha.

Connection refused! Is selenium server started nightwatch on edge

感情迁移 提交于 2019-12-31 05:40:10
问题 I have create a project. It is a vue.js application. There is a small set of unit tests (jest) and an end-to-end test (night watch). When I try and run the end-to-end test using npm i get: Error retrieving a new session from the selenium server Connection refused! Is selenium server started? { value: { message: 'Unable to create session from org.openqa.selenium.remote.NewSessionPayload@16b328bc\nBuild info: version: \'3.12.0\', revision: \'7c6e0b3\', time: \'2018-05-08T15:15:08.936Z\'\nSystem

Nightwatch.js Async Selenium Operations

烂漫一生 提交于 2019-12-25 09:11:07
问题 Say I have a Nightwatch test with two steps that fill out a form. As part of the first step, I need to dynamically query some data from the page (using the Selenium api), then use that data to make additional selenium calls, and use the final result to make custom assertions. The reason I need to use the Selenium api is not that I do not know how to use the normal Nightwatch assertions, but rather that the normal assertions are not sufficient to test the types of things I want to test.