Arsenowitch
Arsenowitch

Reputation: 401

How to choose file to input by nightwatch.js?

Previously I used Webdriver IO for testing, but now I use nightwatch.js.

I have not found solutions in documentation (setValue() is not working)

Webdriver IO provides very simple command for that:

.chooseFile("input", "./path/to/image")

But what I can do by using nightwatch.js?

Upvotes: 1

Views: 2644

Answers (1)

Ivan Aranibar
Ivan Aranibar

Reputation: 2286

The command setValue('input', 'path/to/file') should work, check your file path.

By the way. This question has already been answered previously, check

Upvotes: 2

Related Questions