-
Notifications
You must be signed in to change notification settings - Fork 214
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
Annotation Processors not working in java 10/11 #631
Comments
Thank you for your feedback! FluentLenium was checked mainly for jdk8 and I will try to find the reason for such behavior in newer versions. It is important for us to bring FL to the upcoming Java 11. |
# Conflicts: # examples/cucumber/pom.xml # examples/hooks/pom.xml # examples/quickstart-chrome/pom.xml # examples/quickstart/pom.xml # examples/spock/pom.xml # examples/spring/pom.xml # fluentlenium-assertj/pom.xml # fluentlenium-core/pom.xml # fluentlenium-cucumber/pom.xml # fluentlenium-junit-jupiter/pom.xml # fluentlenium-junit-jupiter/src/it/junit-jupiter/pom.xml # fluentlenium-junit/pom.xml # fluentlenium-junit/src/it/junit/pom.xml # fluentlenium-spock/pom.xml # fluentlenium-testng/pom.xml # fluentlenium-testng/src/it/testng/pom.xml # pom.xml
Looks like it works :) Could you please check w/ 4.0.0 release? |
Unfortunately I'm still getting the same issues as before.
The annotators are not initialising the page objects. Checked on version 4.0.0. with Java 11 |
@paulsjohnson91 Can you please share complete class code? |
` @page @page @before @after @given("^the operator navigates to back office login page$") |
@paulsjohnson91 please copy/paste everything with imports. That would be helpful :) |
` import static com.backoffice.whgtf.test.bnw.util.PropertyHelper.prop; import com.backoffice.whgtf.test.bnw.steps.AbstractCucumberTest; public class LogInSteps extends AbstractCucumberTest { private final String BO_USERNAME = prop("operatorUserName"); @page @page @before @after @given("^the operator navigates to back office login page$") @given("^the operator navigates back to the back office login page$") @given("^the operator is logged in and on the dashboard$") @when("^the operator submits login page$") @then("^the operator is successfully logged in$") @then("^the operator is successfully logged out$") @when("^the operator submits invalid login credentials$") @then("^the operator is not successfully logged in$") ` |
Can you try to extend |
Hi The AbstractCucumberTest class extends the FluentCucumberTest class. Thanks, |
Hi @paulsjohnson91, I was trying reproduce mentioned by you issue and I found out that it is not related with Java 11 because it worked for me smoothly. Please, make sure that your runner class uses Let us know if it resolves your issue. |
Hi, For the scenario listed above I was not running with a runner I was running directly from the IDE. When we use runners we are using AbstractTestNGCucumberTests not JUnit. This setup was working before with Java8 using both the IDE and the TestNG runner to execute the tests. |
Ok, now I understand. There were made few changes to handle integration with Cucumber which are related to you problem. More detail what was changed you can find here #612 and here http://fluentlenium.com/docs/test-runners/#cucumber The quickest way to fix this issue is add this class to your project and extend your AbstractCucumberClass with it:
This issue will be updated when I found better way for injecting FluentLenium components without necessity for repeating before and after hooks. |
I've merged bugfix to develop and it will be incorporated into next version. |
Great thanks, the page issue was fixed by this as long as I added the following to my test step classes: I'm not currently having issues with elements which are initialised with @findby so everything seems to be working as expected now. Thanks for the help |
In java 10 and 11, lazy objects are initializing.
Expected Behavior
@page object should initialize and FluentLenium should go to the page
Current Behavior
examplePage is null so is throwing a NullPointerException.
This also happens with lazy locators with @findby
Context (Environment)
Tried with both Java 10 and 11 on FluentLenium version 3.7.0
The text was updated successfully, but these errors were encountered: