Open varmavg opened 3 years ago
can any one help us ?
does Serenity support new Edge Chromium?
I don’t use Edge or Windows myself, so the best would be to look into the code and see what you need to do to add support for these options
ok thank you
Hi,
I am working on serenity framework for UI automation, and I need to run my test on Edge browser as well, there are few which I am facing when I run on edge browser. I am using msedgedriver.exe(Chromium) The error i am getting is could not instantiate Webdriver.
Could you pls help with the edge options that I need to use in serenity properties file?
Thanks in Advance
@varmavg were you able to run yours tests successfully on microsoft edge chromium browser successfully.?
yes we were able to run successful tests in Edge chromium. use edge chromium 32 bit driver (x86 version) https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
@varmavg Thanks for the quick response. Can you let me know what is that you passed in serenity.conf file or anything that you would have done to run your tests on edge chromium browser using serenity .
(1) POM.xml here is my configurations
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<serenity.version>2.0.40</serenity.version>
<serenity.maven.version>2.0.40</serenity.maven.version>
<serenity.cucumber.version>1.9.31</serenity.cucumber.version>
<tags></tags>
<parallel.tests>4</parallel.tests>
<webdriver.base.url></webdriver.base.url>
<webdriver.driver>edge</webdriver.driver>
<!-- <webdriver.driver>iexplorer</webdriver.driver> -->
<parallel.tests>3</parallel.tests>
</properties>
(2) Serenity.properties
webdriver.chrome.driver=C:\Automation\Drivers\chromedriver.exe chrome.switches=--start-maximized --ignore-urlfetcher-cert-requests --ignore-certificate-errors --disable-machine-cert-request -disable-extensions
webdriver.edge.driver=C:\Automation\Drivers\msedgedriver.exe
(3) installed 32bit Edge drive (compatible with you edge version) in above location.
(4) run configuration clean verify
@varmavg Thanks for the response. Looks like in the latest versions of serenity ,running scenarios on chromium edge browser is not possible.
@kiranAdiga Have you tried to remove the path of the Edge webdriver of the serenity.conf. And put the following code in the object inheriting from PageObject and that all of your custom PageObject inherit from :
static{
System.setProperty("webdriver.edge.driver", "your/path/to/the/webdriver/msedgedriver.exe");
}
It worked for me.
Does anyone know if this has been fixed as to be able to pass edgedriver within the serenity.config file like we do with other web drivers?
i am also trying to pass edge driver from edge.properties file but it was not working for me and also i tried with webdriver manager it launching the browser of different version .
errors
[main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Instantiating driver [main] INFO net.serenitybdd.core.webdriver.driverproviders.ProvideNewDriver - Driver capabilities: Capabilities {browserName: MicrosoftEdge, loggingPrefs: org.openqa.selenium.logging...}
@moebius23 Hello could you please help me with the solution that you shared before?? I Should set this static{ System.setProperty("webdriver.edge.driver", "your/path/to/the/webdriver/msedgedriver.exe"); } Where exactly??? I'm new in SerenityBDD and I need to run a couple of tests on Edge. Thanks.
Does anyone know if this has been fixed as to be able to pass edgedriver within the serenity.config file like we do with other web drivers?
No, is not working through Serenity.confing file.
@moebius23 Hello could you please help me with the solution that you shared before?? I Should set this static{ System.setProperty("webdriver.edge.driver", "your/path/to/the/webdriver/msedgedriver.exe"); } Where exactly??? I'm new in SerenityBDD and I need to run a couple of tests on Edge. Thanks. So in my serenity.conf file, I have set "webdriver.driver = edge".
In my project, every part of the front have its PageObject inheriting from net.serenitybdd.core.pages.PageObject (example: NavigationPage, HeaderPage, ProductsPage, and so on). But they don't inherit directly. I have an object than inherit from PageObject, and every specialised Page inherit from. Let's call it MyProjectPage.
Then the inheritance path should look like this: PageObject->MyProjectPage->ProductsPage
I have put the static block that we are talking about inside MyProductPage class, at the beginning.
I hope it will work for you !
@moebius23 Hello could you please help me with the solution that you shared before?? I Should set this static{ System.setProperty("webdriver.edge.driver", "your/path/to/the/webdriver/msedgedriver.exe"); } Where exactly??? I'm new in SerenityBDD and I need to run a couple of tests on Edge. Thanks. So in my serenity.conf file, I have set "webdriver.driver = edge".
In my project, every part of the front have its PageObject inheriting from net.serenitybdd.core.pages.PageObject (example: NavigationPage, HeaderPage, ProductsPage, and so on). But they don't inherit directly. I have an object than inherit from PageObject, and every specialised Page inherit from. Let's call it MyProjectPage.
Then the inheritance path should look like this: PageObject->MyProjectPage->ProductsPage
I have put the static block that we are talking about inside MyProductPage class, at the beginning.
I hope it will work for you !
@moebius23 Thank you Sir!!!!! It worked perfect!!!
Is there any update on this?
Is there any update on this?
It's an open source project: look in the code (EdgeDriverCapabilities and WhenConfiguringEdgeOptions, get an example working with your code, write up some documentation, and submit a PR to the documentation project.
We are getting pop up message “we couldn’t load the extensions from:” when trying to open Edge (chromium).
We handled this in chrome like chrome.switches = -disable-extensions
Just wondering if there is there anything equivalent to chrome.switches in Edge chromium to provide options in sereity.properties ?