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

Issues with Webelement in Serenity #2905

Closed
Vijay2871 opened this issue Aug 29, 2022 · 3 comments
Closed

Issues with Webelement in Serenity #2905

Vijay2871 opened this issue Aug 29, 2022 · 3 comments

Comments

@Vijay2871
Copy link

When I call the locators from 2 seperator locator class without FindBy -> public static By TWL_SIGNINCLICK = By.xpath("//span[normalize-space()='Sign in']");
one class is working and other is not working all from same package , when i tried to print to understand the rootcause I'm getting this error

java.lang.NullPointerException: No BaseStepListener has been registered - are you running your test using the Serenity runners?
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907)
at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:177)
at net.thucydides.core.steps.StepEventBus.wrapUpCurrentCucumberStep(StepEventBus.java:969)
at net.thucydides.core.steps.StepInterceptor.finishAnyCucumberSteps(StepInterceptor.java:560)
at net.thucydides.core.steps.StepInterceptor.notifyOfStepFailure(StepInterceptor.java:554)
at net.thucydides.core.steps.StepInterceptor.logStepFailure(StepInterceptor.java:476)
at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:468)
at net.thucydides.core.steps.StepInterceptor.runOrSkipMethod(StepInterceptor.java:209)
at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:196)
at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:84)
at net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51)
at PageActions.LoginActions$ByteBuddy$jfZSjHLy.clickSignIn(Unknown Source)
at steps.signInSteps.i_login_as_a_registered_user(signInSteps.java:18)
at ✽.I login as a registered user(file:///C:/Users/316418/Downloads/serenity-junit-starter-master/SerenityCurrent/src/test/resources/features/SignIn.feature:6)

@wakaleo
Copy link
Member

wakaleo commented Aug 30, 2022

There's not enough info to go on here: that failure happens if you try to use Serenity code in a non-Serenity test or test runner.

@Vijay2871
Copy link
Author

Vijay2871 commented Aug 30, 2022

There's not enough info to go on here: that failure happens if you try to use Serenity code in a non-Serenity test or test runner.

In test runner I ran, the issue was "RESOLVED" just now bcoz of one of the broken xpath in qa environment was der among the corrected ones, so when i commented the xpath it was working fine . I was wondering eventhough i was not using the xpath (not commented) and for rootcause i printed the webelement of the correct locators error comes up.

@Vijay2871
Copy link
Author

There's not enough info to go on here: that failure happens if you try to use Serenity code in a non-Serenity test or test runner.

The eloborated issue was #2901

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

2 participants