2

I use below properties to run edge browser, but it doesn't work.

webdriver.edge.driver=src/main/resources/common/msedgedriver.exe
driver.name=edgeDriver

How can I use edge browser?

Moon
  • 137
  • 1
  • 7

2 Answers2

2

In order to set driver executable, you need to set value using appropriate system property for the driver. You can set system property either at the time of execution using -Dpropertyname=value or through code. If you are using qaf, it provides feature to set system property through property file. For that purpose you need to add system prefix with property name. For example:

system.webdriver.edge.driver=src/main/resources/common/msedgedriver.exe

iscj
  • 132
  • 7
  • After set system.webdriver.edge.driver, the driver set successfully, but I get exception "com.qmetry.qaf.automation.core.AutomationError: Unable to Create Driver Instance for edge: unknown error: cannot find MSEdge binary", and It looks like the qaf didn't support edge browser, only selenium support it. https://qmetry.github.io/qaf/latest/how_to_use_driver.html – Moon Jun 13 '20 at 09:27
-1

According to the doc https://qmetry.github.io/qaf/latest/how_to_use_driver.html and check the UiDriverFactory.java in com.qmetry.qaf.automation.ui of qaf, it looks qaf not support this.

Moon
  • 137
  • 1
  • 7
  • 1
    QAF has extended selenium webdriver, so it supports everything supported by selenium. The document you are referring may be old and written when edge was not available. Issue you are facing is generic selenium setup/usage issue. – iscj Jun 13 '20 at 16:28
  • @Moon, I can see edge driver available as known driver in [UiDriverFactory](https://github.com/qmetry/qaf/blob/8b3c3ec84e1b0f8fea72b4e852e636b23e67dfe1/src/com/qmetry/qaf/automation/ui/UiDriverFactory.java#L275). Which version of qaf you are using? If you are using older version of QAF before edgedriver was available, you can either update to newer version or you set additional capability driverClass. – user861594 Jun 14 '20 at 02:13
  • 1
    Thanks, recheck the UIDriverFactory, it's supported Edge. The reason I get failed is I set system.webdriver.edge.driver=src/main/resources/common/msedgedriver.exe, this driver I download from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/, but it would get exception "com.qmetry.qaf.automation.core.AutomationError: Unable to Create Driver Instance for edge: unknown error: cannot find MSEdge binary". After I set system.webdriver.edge.driver=C:/Program Files (x86)/Microsoft/Edge Beta/Application/msedge.exe, this is my edge location, it worked well now. – Moon Jun 14 '20 at 06:18