Updated Edge fingerprinting, was incorrectly being identified as Chrome in some cases.
This commit is contained in:
@@ -127,7 +127,7 @@ beef.browser = {
|
||||
* @example: beef.browser.isEdge()
|
||||
*/
|
||||
isEdge: function () {
|
||||
return !beef.browser.isIE() && !!window.StyleMedia;
|
||||
return !beef.browser.isIE() && !!window.StyleMedia && (window.navigator.userAgent.match(/Edg\/\d+\.\d/) || window.navigator.userAgent.match(/Edge\/\d+\.\d/));
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,6 +113,6 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
|
||||
response = RestClient.get "#{RESTAPI_HOOKS}/#{@session}?token=#{@token}"
|
||||
details = JSON.parse(response.body)
|
||||
|
||||
expect(@driver.browser.to_s.downcase).to eq(details['browser.name.friendly'].downcase).or eq('internet_explorer').or eq('msedge')
|
||||
expect(@driver.browser.to_s.downcase).to eq(details['browser.name.friendly'].downcase).or eq('internet_explorer')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -38,7 +38,7 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
|
||||
end
|
||||
|
||||
TASK_ID = (ENV['TASK_ID'] || 0).to_i
|
||||
CONFIG_FILE = ENV['CONFIG_FILE'] || 'windows/win_10/win10_chrome_81.config.yml'
|
||||
CONFIG_FILE = ENV['CONFIG_FILE'] || 'windows/win10/win10_chrome_81.config.yml'
|
||||
CONFIG = YAML.safe_load(File.read("./spec/support/browserstack/#{CONFIG_FILE}"))
|
||||
CONFIG['user'] = ENV['BROWSERSTACK_USERNAME'] || ''
|
||||
CONFIG['key'] = ENV['BROWSERSTACK_ACCESS_KEY'] || ''
|
||||
|
||||
Reference in New Issue
Block a user