Hi, I’m trying to open Edge Chromium browser using the script. My test requirement is to run the test in Chrome and then within the test, I need to open the Edge Chromium browser, perform some actions and then close it.
I am using the following code to open edge -
WebDriver ed = new EdgeDriver("")
DriverFactory.changeWebDriver(ed)
WebUI.navigateToUrl(“www.google.com”)
I get this error everytime -
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.openqa.selenium.edge.EdgeDriver(java.lang.String)
Please let me know if my approach is wrong. How can I open Edge Chromium using the script ? If my approach is fine, then how should I resolve this constructor issue ?
Thank you so much for your response. Actually, I was giving driver executable path in those strings. Forgot to mention here. I just tried removing that and figured out now that I should set the driver path first like this - System.setProperty(“webdriver.edge.driver”,“my path here”); It works now. Thank you so much again.!