Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
fix duplicate browser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sosodev committed May 29, 2020
1 parent 7ea46e8 commit 398afda
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/kinchan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ def self.find_task(task_symbol)
end

def self.start_browser
if Kinchan.browser_options.nil?
@@browser_webdriver = Selenium::WebDriver.for Kinchan.browser
else
@@browser_webdriver = Selenium::WebDriver.for(Kinchan.browser, options: Kinchan.browser_options)
if @@browser_webdriver.nil?
if Kinchan.browser_options.nil?
@@browser_webdriver = Selenium::WebDriver.for Kinchan.browser
else
@@browser_webdriver = Selenium::WebDriver.for(Kinchan.browser, options: Kinchan.browser_options)
end
end
end

Expand Down

0 comments on commit 398afda

Please sign in to comment.