-
Notifications
You must be signed in to change notification settings - Fork 60
Cannot read property 'ELEMENT' of null
when using page objects in hooks.
#124
Comments
@ringods can you share |
Hook function:
Login PageObject:
And I repeat: this login pageobject works correctly when I use it during a test of the login feature. When invoking it via the |
no ideas. I can make advice to try cucumber hooks - |
@BorisOsipov I migrated from these hooks to the wdio documented cucumber hooks because I thought that the normal cucumber tagged hooks did not have the "correct" integration. |
@ringods can you provide the driver logs? |
Not helpful I guess. The only content after a
That's all. |
Just checking, first of all, did you already fixed this? If not, I was just wondering the following. Where to you open the page, is that also in the |
@wswebcreation this is not fixed yet. The latest code for import Page from './page';
class Login extends Page {
...
open() {
super.open('/#login/');
this.waitForloginPageToLoad();
}
... Base export default class Page {
open(path) {
browser.url(path);
}
} I still get this error with |
Context:
Is the
browser
object fully initialized when running abeforeFeature
hook function? I have this in my wdio config file:The
loginHook
function is called for every feature to have a logged in application session. The only feature where this hook is not used is the login feature itself. TheloginHook
function calls into the same PageObject code as the login feature test code. When testing the login feature, it works, but at the hook time not. Error is:Looking in the main webdriver.io issue database, this resembles a lot issue webdriverio/webdriverio#1811 where an update of the mocha runner is advised. If I look at the changes in the mocha runner, a function titled
waitUntilSettled
is added after executing hooks functions:webdriverio-boneyard/wdio-mocha-framework@865480b
webdriverio-boneyard/wdio-mocha-framework@e4000cf
Any idea?
The text was updated successfully, but these errors were encountered: