Skip to content

Current code not compatible with latest watir-webdriver version and ruby version > 2.5.0 #3

@sakshiseth

Description

@sakshiseth

It needs following changes as per latest watir-webdriver version and ruby version > 2.5.0 :

require "rubygems"
require "watir"

require 'browserstack-automate'
require 'yaml'
BrowserStack.for "cucumber"


path = "features/support/config.yaml"
local_config = YAML.load_file(path)

USERNAME = local_config['BS_USERNAME']
AUTOMATE_KEY = local_config['BS_AUTHKEY']
browserstack_url = 'https://' + USERNAME + ':' + AUTOMATE_KEY + '@hub-cloud.browserstack.com/wd/hub'

Before do |scenario|
  browser = Watir::Browser.new :chrome, {url: browserstack_url}
  @browser = browser
  @browser.driver.manage.window.maximize
end


After do |scenario|
  @browser.close
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions