nightwatch.js

Unable to handle location access pop up on firefox using nightwatch.js

南楼画角 提交于 2020-06-17 22:57:13
问题 While executing selenium tests on firefox using nightwatch.js, the test where our application selects geolocation keeps failing because of a pop-up in firefox asking to allow access keeps blocking the test It works fine on chrome when the configuration is set to "chromeOptions": {"args": ["--no-sandbox","--disable-infobars"]} However, the below options for firefox does not seem to work "firefox": { "selenium_port": 1234, "desiredCapabilities": { "browserName": "firefox", "browserVersion": "74

Unable to handle location access pop up on firefox using nightwatch.js

不想你离开。 提交于 2020-06-17 22:56:42
问题 While executing selenium tests on firefox using nightwatch.js, the test where our application selects geolocation keeps failing because of a pop-up in firefox asking to allow access keeps blocking the test It works fine on chrome when the configuration is set to "chromeOptions": {"args": ["--no-sandbox","--disable-infobars"]} However, the below options for firefox does not seem to work "firefox": { "selenium_port": 1234, "desiredCapabilities": { "browserName": "firefox", "browserVersion": "74

client.elements is not working from a step definition using nightwatch-api

▼魔方 西西 提交于 2020-03-25 18:38:27
问题 I'm trying to do nightwatch and cucumber integration for BDD. I'm unable to access client.elements function in a step function. const { client } = require('nightwatch-api'); const { Given, Then, When } = require('cucumber'); const homePage = client.page.homepage(); Then(/^click "([^"]*)" service from list$/, async(service) => { let result = await client.url('http://localhost:8080/').elements('css selector', 'div.flex.mt-4.v-card.v-sheet.theme--light > div > div > table > tbody > tr'); console

How to test css properties of pseudo elements in Nightwatch

这一生的挚爱 提交于 2020-03-03 04:59:45
问题 I want to test the background image is correct on my website using Nightwatch, but its set to be the background of a ::before pseudo element, here is the CSS .icon-circle-delete:before { content: ''; background: url(images/svg/delete.svg) no-repeat 50% 50%; display: inline-block; width: 16px; height: 16px; I've tried the following: .assert.cssProperty("i.icon-circle-delete", "background", "url(clientlib-site/images/svg/delete.svg) "); .assert.cssProperty("i.icon-circle-delete:before",

setValue method in Nightwatch is not working

耗尽温柔 提交于 2020-02-25 07:12:40
问题 I am trying to setup a new Nightwatch project for the purpose of automating a simple Google search page. My assert for searchbox present on page passes, but I am not able to perform any mouse/keyboard action on the elements ( Searchbox , or SearchButton ) Note: I am running Nightwatch version 1.0 . Test case: module.exports = { before : function(browser) { browser.globals.waitForConditionTimeout = 5000; }, tags: ['google'], 'Demo test Google' : function (browser) { browser .url('http://www

setValue method in Nightwatch is not working

倾然丶 夕夏残阳落幕 提交于 2020-02-25 07:12:04
问题 I am trying to setup a new Nightwatch project for the purpose of automating a simple Google search page. My assert for searchbox present on page passes, but I am not able to perform any mouse/keyboard action on the elements ( Searchbox , or SearchButton ) Note: I am running Nightwatch version 1.0 . Test case: module.exports = { before : function(browser) { browser.globals.waitForConditionTimeout = 5000; }, tags: ['google'], 'Demo test Google' : function (browser) { browser .url('http://www

TypeError [ERR_UNESCAPED_CHARACTERS] when running nightwatchjs test

こ雲淡風輕ζ 提交于 2020-02-25 06:05:18
问题 I just updated my chromedriver from version 74.x.x to 76.x.x and received the following error: Error while running .isElementDisplayed() protocol action: TypeError [ERR_UNESCAPED_CHARACTERS]: Error while trying to create HTTP request for "/wd/hub/session/676ee244a59ce7cba8601d00582bbe13/element/[object Object]/displayed": Request path contains unescaped characters at new ClientRequest (_http_client.js:115:13) at Object.request (http.js:42:10) at HttpRequest.createHttpRequest (/Users

How to check full page for broken images using nightwatch.js?

南笙酒味 提交于 2020-01-25 06:49:13
问题 Hey I'm trying to write a test to check if all images have loaded on the page using one test. I thought this would be a simple test that loads of people have done but I can't find anything that helps me achieve it. I've tried using the code below but still can't figure how to loop through each image and check to see if it has loaded browser.elements('css selector', 'img', function (result) {} if anyone could point me in the right direction that would be amazing. I need to write a test to

How to use Fake timers with nightwatch.js and sinon.js?

女生的网名这么多〃 提交于 2020-01-13 16:29:15
问题 I'm doing JavaScript e2e test with nightwatch.js, and I want to mock the clock with sinon.js's fake timer http://sinonjs.org/docs/#clock But test stops before finish it, I got the log like below, and doesn't progress anymore. [some test] Test Suite =============================== ✔ Element <body> was visible after 5000 milliseconds. My test code is like below. How can I solve the problem? Thank you. module.exports = { before: function(browser) { clock = sinon.useFakeTimers(new Date(2015, 7,

Error when running Selenium Server via Nightwatch

*爱你&永不变心* 提交于 2020-01-07 04:58:26
问题 I'm attempting to run a simple test script. But I receive the following error: I have my nightwatch config file setup as so: nightwatch.conf.js module.exports = { "src_folders": [ "tests"// Where you are storing your Nightwatch e2e/UAT tests ], "output_folder": "./reports", // reports (test outcome) output by nightwatch "selenium": { "start_process": true, // tells nightwatch to start/stop the selenium process "server_path": "./node_modules/selenium-standalone/.selenium/selenium-server/2.53.1