serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
720 stars 519 forks source link

Unable to open the browser in serenity 3.6.1 and selenium 4.6.0 #3017

Open nshiveg opened 1 year ago

nshiveg commented 1 year ago

Hi John,

We are getting the below issue when we tried upgrading the project from 3.1.5 serenity to latest and latest selenium

To verify that tampered alerts are raised for the camera

10:50:16.391 [main] ERROR - Test failed at step: And User navigates to SA url 10:50:16.392 [main] ERROR - Bad type on operand stack ????????????????????????????????????????????????????????????????????????????????????? ? Share your Cucumber Report with your team at https://reports.cucumber.io ? ? Activate publishing with one of the following: ? ? ? ? src/test/resources/cucumber.properties: cucumber.publish.enabled=true ? ? src/test/resources/junit-platform.properties: cucumber.publish.enabled=true ? ? Environment variable: CUCUMBER_PUBLISH_ENABLED=true ? ? JUnit: @CucumberOptions(publish = true) ? ? ? ? More information at https://cucumber.io/docs/cucumber/environment-variables/ ? ? ? ? Disable this message with one of the following: ? ? ? ? src/test/resources/cucumber.properties: cucumber.publish.quiet=true ? ? src/test/resources/junit-platform.properties: cucumber.publish.quiet=true ? ????????????????????????????????????????????????????????????????????????????????????? Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 18.672 sec <<< FAILURE! - in com.nokia.automation.ISARunner_SA_F01 To verify that tampered alerts are raised for the camera(Tamper detection and alert generation) Time elapsed: 1.491 sec <<< ERROR! java.lang.VerifyError: Bad type on operand stack Exception Details: Location: net/serenitybdd/core/webdriver/driverproviders/EdgeDriverProvider.newInstance(Ljava/lang/String;Lnet/thucydides/core/util/EnvironmentVariables;)Lorg/openqa/selenium/WebDriver; @57: invokevirtual Reason: Type 'org/openqa/selenium/edge/EdgeOptions' (current frame, stack[1]) is not assignable to 'org/openqa/selenium/chromium/ChromiumOptions' Current Frame: bci: @57 flags: { } locals: { 'net/serenitybdd/core/webdriver/driverproviders/EdgeDriverProvider', 'java/lang/String', 'net/thucydides/core/util/EnvironmentVariables', 'org/openqa/selenium/edge/EdgeOptions' } stack: { 'net/serenitybdd/core/webdriver/driverproviders/ConfigureChromiumOptions', 'org/openqa/selenium/edge/EdgeOptions' } Bytecode: 0x0000000: b800 0ab6 000b 9900 0bbb 000c 59b7 000d 0x0000010: b02a 120e 2cb6 000f 1211 b800 122c b800 0x0000020: 1312 14b6 0015 b600 164e 2d2a 2bb6 0017 0x0000030: b600 1857 2cb8 0019 2db6 001a c000 1b3a 0x0000040: 042a b400 05b8 001c 2db6 001d 572a b400 0x0000050: 0912 0e2a 1904 b600 1eb9 001f 0300 bb00 0x0000060: 2059 1904 b700 21b0
Stackmap Table: same_frame(@17)

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

Results :

Tests in error: Bad type on operand stack Exception Details: Location: net/serenitybdd/core/webdriver/driverproviders/EdgeDriverProvider.newInstance(Ljava/lang/String;Lnet/thucydides/core/util/EnvironmentVariables;)Lorg/openqa/selenium/WebDriver; @57: invokevirtual Reason: Type 'org/openqa/selenium/edge/EdgeOptions' (current frame, stack[1]) is not assignable to 'org/openqa/selenium/chromium/ChromiumOptions' Current Frame: bci: @57 flags: { } locals: { 'net/serenitybdd/core/webdriver/driverproviders/EdgeDriverProvider', 'java/lang/String', 'net/thucydides/core/util/EnvironmentVariables', 'org/openqa/selenium/edge/EdgeOptions' } stack: { 'net/serenitybdd/core/webdriver/driverproviders/ConfigureChromiumOptions', 'org/openqa/selenium/edge/EdgeOptions' } Bytecode: 0x0000000: b800 0ab6 000b 9900 0bbb 000c 59b7 000d 0x0000010: b02a 120e 2cb6 000f 1211 b800 122c b800 0x0000020: 1312 14b6 0015 b600 164e 2d2a 2bb6 0017 0x0000030: b600 1857 2cb8 0019 2db6 001a c000 1b3a 0x0000040: 042a b400 05b8 001c 2db6 001d 572a b400 0x0000050: 0912 0e2a 1904 b600 1eb9 001f 0300 bb00 0x0000060: 2059 1904 b700 21b0
Stackmap Table: same_frame(@17)

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[INFO]

nshiveg commented 1 year ago

My POM has the latest serenity details in it.. I am trying to launch the browser using open method. I have provided the webdriver details in the conf file. All these days I was passing the URL from the serenity.propery file. I have update to give it from the conf file. But still we are seeing the error.

When I updated the conf without the URL I got this error

===========================ERROR================= Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 14.298 sec <<< FAILURE! - in com.nokia.automation.ISARunner_SA_F01 To verify that tampered alerts are raised for the camera(Tamper detection and alert generation) Time elapsed: 1.143 sec <<< FAILURE! java.lang.AssertionError: Undefined default URL for page object PageObject

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

Results :

Failed tests: Undefined default URL for page object PageObject

When I give the URL in the serenity conf file then I am getting the below error

Tests in error: Bad type on operand stack Exception Details: Location: net/serenitybdd/core/webdriver/driverproviders/EdgeDriverProvider.newInstance(Ljava/lang/String;Lnet/thucydides/core/util/EnvironmentVariables;)Lorg/openqa/selenium/WebDriver; https://github.com/57: invokevirtual Reason: Type 'org/openqa/selenium/edge/EdgeOptions' (current frame, stack[1]) is not assignable to 'org/openqa/selenium/chromium/ChromiumOptions' Current Frame: bci: https://github.com/57 flags: { } locals: { 'net/serenitybdd/core/webdriver/driverproviders/EdgeDriverProvider', 'java/lang/String', 'net/thucydides/core/util/EnvironmentVariables', 'org/openqa/selenium/edge/EdgeOptions' } stack: { 'net/serenitybdd/core/webdriver/driverproviders/ConfigureChromiumOptions', 'org/openqa/selenium/edge/EdgeOptions' }

POM values

4.6.0 2.52.0 4.0.0-rc-1 3.5.1
nshiveg commented 1 year ago

Hi John,

Any help on the above?

wakaleo commented 1 year ago

Looks like something it doesn't like in the edge options.

nshiveg commented 1 year ago

Hi John, Is there any change in the way we launch the browser now? We were using the open method present in the core\pages\PageObject.java.

We used to provide the url in the serenity.properties

webdriver.base.url ="url"

and browser information from the command line while running.

-Dwebdriver.driver=chrome -Dwebdriver.chrome.driver=path\chromedriver.exe clean install

I know there is change in the latest but we didn't get to know how to provide it. I went through your many blogs and all. But no help. Please help /**

wakaleo commented 1 year ago

If you need help for your specific project, we can certainly do that as part of a support package - would you like me to send you an email with further details and options?

nshiveg commented 1 year ago

Hi John, I would love to get the support. Please send me an email. I will be really interested.

wakaleo commented 1 year ago

@nshiveg Sure, can do: could you send me an email to john.smart[AT]wakaleo.com?