isDisplayed/isElementPresent throw the TypeError: cannot read property 'isDisplayed' of undefined

76 views
Skip to first unread message

Varsha Joshi

unread,
Oct 26, 2016, 2:50:32 AM10/26/16
to Angular
Hello,

I am a newbie to protractor - come from Selenium Java background.
I was going through the tutorials and trying out to set this on my mac.

When I run the conf.js - I get the Type Error:

Please let me know what is that I am doing incorrectly here. Am I missing a plugin?

Thanks
Varsha

[13:24:12] I/launcher - Running 1 instances of WebDriver

Started

F


Failures:

1) adminapploginPage loginElements should be present encountered a declaration exception

  Message:

    TypeError: Cannot read property 'isDisplayed' of undefined

  Stack:

    TypeError: Cannot read property 'isDisplayed' of undefined

        at Suite.<anonymous> (/Users/vjoshi/proAutomation/blAdminLogin-spec.js:17:43)

        at Suite.<anonymous> (/Users/vjoshi/proAutomation/blAdminLogin-spec.js:15:4)

        at Object.<anonymous> (/Users/vjoshi/proAutomation/blAdminLogin-spec.js:5:1)

        at Module._compile (module.js:409:26)


1 spec, 1 failure

Finished in 2.048 seconds


[13:24:15] I/launcher - 0 instance(s) of WebDriver still running

[13:24:15] I/launcher - chrome #01 failed 1 test(s)

[13:24:15] I/launcher - overall: 1 failed spec(s)

[13:24:15] E/launcher - Process exited with error code 1

blAdminLogin-spec.js
conf.js
LoginPage.js

Varsha Joshi

unread,
Oct 26, 2016, 1:57:29 PM10/26/16
to Angular
I had to add a line to config to find the ng-app rootElement: '[ng-app="name"]', - hopefully this helps someone trying to reslove this issue.
Reply all
Reply to author
Forward
0 new messages