0

I am getting below error when trying to login (button click). Page loading correctly though. I am using framework called Bobcat which is a selenium wrapper

code :

 @Given("^I login to AEM$")
    public void I_have_opened_login_page() throws ActionException {
        controller.execute(AemActions.LOG_IN);
    }

refer this to more details

Error:

abc.RunTests > Plan Long Description functional test cases.Validate if author can change the text color STANDARD_OUT
        Given I login to AEM                                                                                     # CommonSteps.I_have_opened_login_page()
          java.lang.NullPointerException
        at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions.addCookie(RemoteWebDriver.java:681)
        at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringOptions.addCookie(EventFiringWebDriver.java:615)
        at com.cognifide.qa.bb.aem.core.login.actions.LogIn.execute(LogIn.java:59)
        at com.cognifide.qa.bb.api.actions.internal.DefaultController.execute(DefaultController.java:49)
        at abc.steps.CommonSteps.I_have_opened_login_page(CommonSteps.java:32)

And the other interesting thing is in the reports under the standard error it shows below. But as per my readings it's a informational message: Answer

Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on port 11718
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Jun 19, 2019 10:20:09 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
com.cognifide.qa.bb.aem.core.pages.AemPageManipulationException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.cognifide.qa.bb.aem.core.pages.sling.DeletePage.execute(DeletePage.java:59)
    at com.cognifide.qa.bb.aem.core.pages.sling.DeletePage.execute(DeletePage.java:42)
    at com.cognifide.qa.bb.api.actions.internal.DefaultController.execute(DefaultController.java:55)
    at abc.steps.CommonSteps.tearDown(CommonSteps.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method

My versions as below;

ChromerDriver : chromedriver_74.0.3729.6 this is match with chrome browser version

Gradle wrapper

------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------

Build time:   2018-04-18 09:09:12 UTC
Revision:     b9a962bf70638332300e7f810689cb2febbd4a6c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_181 (Oracle Corporation 25.181-b13)
OS:           Windows 10 10.0 amd64
Shabar
  • 2,617
  • 11
  • 57
  • 98
  • We would need to see the code of `com.cognifide.qa.bb.aem.core.login.actions.LogIn` to be able to help you out. – Ardesco Jun 19 '19 at 07:31
  • You should ask this question in their GitHub page. [Link](https://github.com/Cognifide/bobcat/issues) – Fenio Jun 19 '19 at 10:52
  • @Ardesco I have added the code to the question where it is calling the `AEM` api with login credentials to login to AEM. I get this error at that point. Could it be network related issue? – Shabar Jun 19 '19 at 11:08
  • NullPointerExceptions are not network related. It usually means that somewhere in the code something is not being instantiated before it is used. NullPointerExceptions fired on the driver object are normally caused because the driver object has not been instantiated. I'm going to guess that you have missed some pre-req that the library expects – Ardesco Jun 19 '19 at 13:04

0 Answers0