question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nightwatch.conf example for mobile testing

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report
[x ] feature request
[ ] support request => Please do not submit support request here, instead use [Stack Overflow](https://stackoverflow.com/questions/tagged/nightwatch.js+cucumber)

Current behavior there are no example to use nightwatch-cucumber with user agent for mobile test

Expected/desired behavior it is very usefull to have an example in nightwatch.conf.js an example something like that :

chrome_mobile: { desiredCapabilities: { browserName: “chrome mobile”, javascriptEnabled: true, acceptSslCerts: true }, selenium: { cli_args: { ‘webdriver.chrome.driver’: chromedriver.path, ‘–user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A’, ‘–window-size=320,640’ } } } },

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
krzysztof-kabalacommented, Dec 11, 2018

just a small notice because this thread is hight-listed on Google

desiredCapabilities: {
   browserName : "chrome",
   chromeOptions: {
      args: ["headless", "disable-gpu"],
         mobileEmulation: {
            deviceName: "Iphone SE"
         }
      },
}

can be used.

1reaction
kerimovaacommented, Oct 12, 2017

You just need add chromeOptions in your conf. Thats my conf:

desiredCapabilities: {
        browserName: 'chrome',
        javascriptEnabled : true,
        acceptSslCerts : true,
        chromeOptions: {mobileEmulation: {
        deviceMetrics: {width: 360, height: 640, pixelRatio: 3},
        userAgent:
          'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like 
           Gecko) Chrome/60.0.3112.101 Mobile Safari/537.36 profi-autotest',
          }
      }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Mobile Web Testing | Developer Guide - Nightwatch.js
Learn how to use nightwatch with appium for mobile testing. ... We can add configuration in Nightwatch to run our tests on mobile...
Read more >
NightwatchJS Tutorial: Get Started with Automation Testing
What is Nightwatch Framework? How does it work? Read Nightwatch JS Tutorial to run their first test with help of examples and sample...
Read more >
Nightwatch.js Tutorial For Test Automation - LambdaTest
In this Nightwatch.js tutorial, we will learn how to perform automation testing with Nightwatch.js and WebDriver, using a remote Selenium ...
Read more >
Automation Testing with Nightwatch JS and Cucumber - Velotio
Lightweight framework · Robust configuration · Integrates with cloud servers like SauceLabs and Browserstack for web and mobile testing with JavaScript, Appium ...
Read more >
Mobile Web Testing Using Nightwatchjs Part 1 (iOS)
Ever since I came across examples of Nightwatch porting over its test codebase to mobile services like Appium, simply by adding to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found