-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@FindBy annotation is not being initialized #3466
Comments
I would generally advise against using @findby, but I'm not sure why it wouldn't get initialised. Have a look in the PageObject class to see if you can see any reason why it might be getting skipped. |
I tried with By locator Strategy and its working. However for Thanks for the help @wakaleo |
I can confirm this is still working for the projects I have tried it on. However your Page Object looks a bit odd - you shouldn't have @steps inside a page object or be creating it using the @steps annotation - that is only for step libraries. Page Objects are instantiated automatically and should not contain step libraries, only locators and page-specific logic. |
Closed presumed resolved. |
from 4.1.8 , @findby annotation is not getting initialized , Here is an example
I have
LaunchPage.java
where i have initialized propertiesusername
andpassword
.LaunchPage.java
is referenced like this from base class as followsHowever when i try to make actions on the property, its getting failed as
username
is getting null reference error and when i see that page during initialization i can see the following variables, and in here username and password are null.The text was updated successfully, but these errors were encountered: