Reputation: 7630
I am following this tutorial
I followed steps except according this post
instead of
npm install -g protractor
I applied
npm install -g protractor --no-optional
I successfully completed Step 0 - write a test
expect(browser.getTitle()).toEqual('Super Calculator');
However when I try Step 1 - interacting with elements
element(by.model('first')).sendKeys(1);
it gives error:
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
F
Failures:
1) Protractor Demo App should add one and two
Message:
UnknownError: null
Stacktrace:
UnknownError: null
//... continue stack trace
I can see that I can access dom element by testing:
element(by.model('firstXXX')).sendKeys(1);
then it says,
NoSuchElementError: No element found using locator: by.model("firstXXX")
What could be reason for error message mentioned above:
Message:
UnknownError: null
Also 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]
Upvotes: 1
Views: 860