Questions tagged [nightwatch]

This tag should be used to ask questions about the e2e testing framework Nightwatch

This tag should be used to ask questions about the e2e testing framework Nightwatch

Nightwatch.js is an automated testing framework for web applications and websites, written in Node.js and using the W3C WebDriver API

123 questions
0
votes
1 answer

Nightwatch Internet Explorer - argument for private mode

In my nightwatch.conf.js I have: "desiredCapabilities": { "browserName": "internet explorer", "javascriptEnabled": true, "acceptSslCerts": true, }, What is the name of the property that…
Alichino
  • 1,668
  • 2
  • 16
  • 25
0
votes
1 answer

Nightwatch - Using a custom command with variables within page object pattern

In our Nightwatch codebase we utilise the page object pattern. I’m trying to create a selectFromDropdown function to use throughout our checks, so I thought putting this in a customCommands folder made sense. Now, when I go to use my…
0
votes
1 answer

Uploading a file with Nightwatch and Browser Stack / Selenium Grid

I'm trying to upload a file in a nightwatch test that is being run on Browserstack in IE11. Here is what I have: browser.execute(function (data) { const el = document.querySelector('input#fileUpload'); el.style.display = "block"; …
Ben
  • 1,525
  • 11
  • 19
0
votes
1 answer

How to verify that only matching elements are present in a search?

Bad title, I know, but it's hard to explain in few words. I'm automating on nightwatch and ran into something that has me stumped as I'm used to coding on JS only for automation. Normally, it's easy to verify that an element is present, or that an…
0
votes
2 answers

How to send keypress combinations in nightwatch

I can send a single key press in night-watch without a problem, but I need to press combination of them. For example UP_ARROW + SHIFT Code from page objects. this.sendKeys('@pmField', this.api.Keys.UP_ARROW+this.api.Keys.SHIFT) This function just…
0
votes
1 answer

Nightwatch: Can't make dynamic selector in page objects

I can't find a way to make a selector in page objects dynamic. Is there workaround for this problem? module.exports = { searchSelect: { selector: '//span[contains(.,'+dynamicVar+')]', locateStrategy: 'xpath' }, } I…
0
votes
1 answer

how to disable Zalenium video recording for nightwatch Js

I am using Zalenium server for nightwatch scripts. I want to disable live video recording.Is there any parameter we can specify in nightwatch.json file? Found following code for java .Not sure how to use it in nightwatch.js DesiredCapabilities…
Sree Nike
  • 3
  • 2
0
votes
1 answer

How do I prevent errors when clicking an element on the page but not scrolled into view in nightwatch.js?

I am writing a test for an element on the page, but not scrolled into view. Whenever I use pageObject.click("@MyElement) on the element, it throws this error: Error while running .clickElement() protocol action: element click intercepted: Element is…
0
votes
1 answer

"SyntaxError: missing ) after argument list " Nightwatch

basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") ^^^^^^^ SyntaxError: missing ) after argument list I'm trying to debug the Nightwatch code. Can anyone help me in resolving this issue
0
votes
1 answer

How to close the safari pop up dialogue when running automate script with nightwatch on BrowserStack?

I use Browserstack to do the E2E testing, now I met a problem when I try to run the mobile automate script in safari on Browserstack, there will have a pop-up dialogue show when I click a button which will result in opening a new tab, the dialogue…
shane
  • 3
  • 2
0
votes
1 answer

How do I make an assertion before an action in Gherkin?

I have a website that opens a dialog where you can add rows of information like a spreadsheet. There is a total amount that shows in the window that adds up a column of items in the table (before the user clicks save). When the user is done editing…
swaplink
  • 43
  • 2
  • 8
0
votes
1 answer

Nightwatch.js - How to do assertion on new browser tab

I have to test one scenario. User types desired URL to text which is linked with button. When user clicks this button, user will be directed to typed URL. When I do assertion for new tab (Google), output is always like "localhost:8080" which is my…
0
votes
1 answer

Need help how to use execute('scrollTo(0,500)') inside POM function, but it says execute is not a function

I am trying to create a function using execute to use inside POM ForthStCheck:function(){ this.waitForElementPresent('body', 30000) . execute('scrollTo(0,500)')
0
votes
0 answers

Error Occured while trying to start Nightwatch Runner

I have successfully ran my test previously but now I am getting this error. An error occurred while trying to start the Nightwatch Runner: Invalid testing environment specified: chrome\. Available environments are: chrome, firefox, edge at…
bear71
  • 1
0
votes
0 answers

Is possible to generate name of browser that will be used in name of file?

I need put name of used browser to the 'reportFilename' in nightwatch-html-reporter. It means: when the test ends the name of file will be something like this: firefox_1559642651723 I checked the xml reporter that is builded in Nightwatch from the…
Karel Junek
  • 33
  • 10
1 2 3
8
9