Skip to content
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

Issue with withAction().moveToElement(element) method. #14

Open
tiwari90 opened this issue May 13, 2020 · 9 comments
Open

Issue with withAction().moveToElement(element) method. #14

tiwari90 opened this issue May 13, 2020 · 9 comments

Comments

@tiwari90
Copy link

Test execution blocked if we use withAction().moveToElement(element) method.

This happens only when a step has failed due to some exception, serenity successfully skips the remaining test steps but blocked if there is a step which calls withAction().moveToElement(element) method.

I have created a repository showing the issue.
https://github.com/tiwari90/serenity-junit.git

@globalworming
Copy link
Contributor

ok, here is my output

22:17:18.570 [main] INFO  n.t.c.steps.ConsoleLoggingListener - STARTING STEP Open: http://thedemosite.co.uk/savedata.php
22:17:19.313 [main] INFO  n.t.c.steps.ConsoleLoggingListener - FINISHING STEP
22:17:19.319 [main] INFO  n.t.c.steps.ConsoleLoggingListener - STARTING STEP Should see user name enabled
22:17:19.321 [main] INFO  pages.LoginPage - Checking Username Enabled
22:17:19.624 [main] INFO  n.t.c.steps.ConsoleLoggingListener - FINISHING STEP
22:17:19.631 [main] INFO  n.t.c.steps.ConsoleLoggingListener - STARTING STEP Enter user name
22:17:19.633 [main] INFO  pages.LoginPage - Enter Username
22:17:20.080 [main] INFO  n.t.c.steps.ConsoleLoggingListener - FINISHING STEP
22:17:20.085 [main] INFO  n.t.c.steps.ConsoleLoggingListener - STARTING STEP Enter password
22:17:20.088 [main] INFO  pages.LoginPage - Entering Password 
22:17:45.362 [main] INFO  n.t.c.steps.ConsoleLoggingListener - STEP FAILURE: net.thucydides.core.webdriver.exceptions.ElementShouldBeEnabledException: Expected enabled element was not enabled
22:17:45.431 [main] INFO  pages.LandingPage - Hover Started, test case stops here if there is an exception
22:17:45.451 [main] INFO  n.t.c.steps.ConsoleLoggingListener - STARTING STEP Should see submit button enabled
22:17:45.454 [main] INFO  n.t.c.steps.ConsoleLoggingListener - IGNORING STEP

which seems fine, there is nothing blocked for me. I am not sure though if the hover action is actually performed, i hope not.

@tiwari90
Copy link
Author

what chromedriver version you are using ?

@globalworming
Copy link
Contributor

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'stalker', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-51-generic', java.version: '1.8.0_171'
Google Chrome Version 74.0.3729.131

@tiwari90
Copy link
Author

@globalworming
tried with chrome 74 and its working for me as well.

While debugging I tried with chrome version 77 and 81, it was not working.
Can you please check once at your end as well?

If it will fail for you then, it should be a chromedriver issue, but then can we handle that in Serenity?

@tiwari90
Copy link
Author

If i use StepEventBus.getEventBus().getBaseStepListener().aStepHasFailed() method then I am able to skip the execution, without downgrading the chromeDriver version, but I think this is not the right way to handle execptions.

public void moveMouseToLogo() throws Exception {
if (!StepEventBus.getEventBus().getBaseStepListener().aStepHasFailed()) {
LOGGER.info("Hover Started, test case stops here if there is an exception");
withAction().moveToElement(addUserText).build().perform();
LOGGER.info("Hover Ended");
}
}

@wakaleo
Copy link
Member

wakaleo commented May 14, 2020

This should be fixed in version 2.2.7

@tiwari90
Copy link
Author

@wakaleo
Thank you for the acknowledgment.
when can we expect 2.2.7 release(approx)?

@wakaleo
Copy link
Member

wakaleo commented May 14, 2020 via email

@tiwari90
Copy link
Author

Verified the issue with the latest serenity version(2.2.7), and it's working as expected now.

Thanks,
@wakaleo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants