Is the Webdriverio element required to be a string?
This is my code:
describe('Testing Contact Us form via WebdriverUni', function() {
it.only('Should successfully submit a contact us form', function(done) {
browser.pause(5000);
var firstNameTextField = $("[name='first_name']");
var lastNameTextField = "[name='last_name']";
browser.setValue(firstNameTextField, 'Joe');
I am getting an exception stating 'element needs to be type of String' when using variables and $.
The same exception occurs with the following:
var firstNameTextField = browser.element("[name='last_name']");
However, this line works fine:
browser.setValue("[name='first_name']", 'Joe');
Any suggestions?