Currently, I am following this tutorial
I went through all the steps mentioned in the tutorial except for what was suggested in this post
instead of
npm install -g protractor
I opted for
npm install -g protractor --no-optional
So far, I have successfully completed Step 0 - write a test
expect(browser.getTitle()).toEqual('Super Calculator');
However, when I proceeded to Step 1 - interacting with elements
element(by.model('first')).sendKeys(1);
This resulted in an error:
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instance of WebDriver
F
Failures:
1) Protractor Demo App should add one and two
Message:
UnknownError: null
Stacktrace:
UnknownError: null
//... continue stack trace
After trying to access a dom element by using:
element(by.model('firstXXX')).sendKeys(1);
I received this message:
NoSuchElementError: No element found using locator: by.model("firstXXX")
What do you think could be causing the error message mentioned above?
Message:
UnknownError: null
In addition, here is the output from webdriver-manager start
console:
16:41:27.526 INFO - Executing: [send keys: null null, [1]])
16:41:27.527 WARN - Exception thrown
java.lang.NullPointerException
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:49)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:168)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
16:41:27.530 WARN - Exception: null
16:41:27.658 INFO - Executing: [delete session: 157e0397-52e0-4d03-b8ee-aef453cd83a2])
16:41:28.843 INFO - Done: [delete session: 157e0397-52e0-4d03-b8ee-aef453cd83a2]