Akash Malpure
Akash Malpure

Reputation: 31

Can I open Microsoft EDGE through JMeter?

I want to open EDGE browser through JMeter. All other browsers have specific config element present within JMeter. But Edge does not have any & I want to use the edge browser.

Upvotes: 2

Views: 2286

Answers (2)

Vadim Yangunaev
Vadim Yangunaev

Reputation: 1991

Updated: To invoke the EDGE browser through a WebDriver in JMeter follow this steps:

  1. Download Microsoft Edge WebDriver
  2. Install JMeter-Plugins
  3. Add jp@gc - WebDriver Sampler to your test plan
  4. Add jp@gc - Internet Explorer Driver Config to your test plan
  5. Choose Internet Explorer Driver Config and open an Internet Explorer tab
  6. Specify the path to the EDGE WebDriver in the appropriate field
  7. Save and Run your test - EDGE browser will be launched!

enter image description here

Also you may just simulate EDGE browser without WebDriver

  1. Add HTTP Header Manager
  2. Add User-Agent header with one of Edge User Agent strings to HTTP Header Manager

Some strings for example, chhose nay one to simulate EDGE:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586

User-agent strings for Microsoft Edge

Microsoft Edge for desktop and mobile in Windows 10 and RemoteIE builds is designed for maximum interoperability with other modern browsers and contemporary web content. The desktop, mobile, and WebView user-agent strings are below.

Desktop:

 Mozilla/5.0 (Windows NT 10.0; <64-bit tags>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Safari/<WebKit Rev> Edge/<EdgeHTML Rev>.<Windows Build>

Mobile

 Mozilla/5.0 (WM 10.0; Android <Android Version>; <Device Manufacturer>; <Device Model>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev> Edge/<EdgeHTML Rev>.<Windows Build>

Microsoft EDGE User-agent string changes

Upvotes: 1

Dmitri T
Dmitri T

Reputation: 168092

Currently WebDriver Sampler plugin doesn't support Edge browser, you can reach out toJMeter Plugins developers and maintainers and clarify is the feature on the roadmap and if/when it will be implemented.

In the meantime you can still launch Edge browser from JMeter using JSR223 Sampler and Groovy language

  1. Make sure to install JMeter WebDriver plugin. The below instructions assume Selenium/WebDriver Support plugin version 3.0, it can be installed using JMeter Plugins Manager:

    enter image description here

  2. Download selenium-edge-driver-3.14.0.jar and store it under "lib" folder of your JMeter installation
  3. Download MicrosoftWebDriver.exe for your Edge version and put it under "lib" folder of your JMeter installation
  4. Restart JMeter to pick the .jar up
  5. Add JSR223 Sampler to your Test Plan
  6. Put the following code into "Script" area:

    System.setProperty("webdriver.edge.driver", "../lib/MicrosoftWebDriver.exe");
    def driver = new org.openqa.selenium.edge.EdgeDriver()
    driver.get("http://jmeter.apache.org")    
    
  7. That's it, JMeter should kick off Edge browser and open the JMeter website

Upvotes: 3

Related Questions