5

It looks like you simply need to encode the file to a base64 string: chromeOptions : { extensions: [encode('./extension_1_5.crx')] } function encode(file) { var stream = require('fs').readFileSync(file); return new Buffer(stream).toString('base64'); }


5

Before jumping into Automation it is best to decide what kind of Automation is best fit for the Product and the Team. A process I have used to access and determine automation is: Pull together a team of core engineers, the quality lead/manager, and the development lead/Manager to outline the Automation Strategy. Ensure that Automation is NOT assumed to ...


2

Nightwatch represents each spec file as an exported object mapping the test names to the test functions. To generate tests from data, therefore, you can use any means of adding properties to an object provided by JavaScript. For example, given: [ { "title": "First test", "url": "https://google.com" }, { ...


2

From Selenium Documentation: You may, or may not, need the Selenium Server, depending on how you intend to use Selenium-WebDriver. If your browser and tests will all run on the same machine, and your tests only use the WebDriver API, then you do not need to run the Selenium-Server; WebDriver will run the browser directly. There are some ...


1

I'll also answer my own question because after another day or two, I've read more of the documentation and found that since nightwatch version 1.3, it supports BDD syntax similar to e.g. Cypress. It's still marked as beta. An example could be: const testData = require('../Resources/userData.json'); const credentials = require('../Resources/credentials.json');...


1

Query-1: Using of tag is also a very useful practice while working with nightwatch. You can use @tags to run the testcases without using --testcase for example $nightwatch --tag <tagname> Query-2: No, There is no standard way to run 2 single test case from 2 different test suites as this is not a standard practice. If you think that those cases are ...


1

I have not found a better solution so far, but I'm using --accept-notifications and it's working well enough.


1

It might be an issue with the version of IEDriver. Try to downgrade to stable version and try again. Try the following commands: selenium-standalone install --version=2.47.0 --drivers.ie.version=2.53.1 selenium-standalone start --version=2.47.0 --drivers.ie.version=2.53.1 or the same but for webdriver-manager


1

On the Mac the .windowsMaximize() is interpreted as a plus button click. This represents a Size to best fit command. It is not like a Maximize on a Windows OS. It will only maximize vertically. A workaround is to start Chrome with the start-fullscreen command: ChromeOptions options = new ChromeOptions(); options.addArguments("start-fullscreen");


Only top voted, non community-wiki answers of a minimum length are eligible