Skip to content

Commit

Permalink
Fixing hanging specs by specifying the remote debug port. You can use…
Browse files Browse the repository at this point in the history
… an ENV to override it if you need. Fixes #158
  • Loading branch information
jwoertink committed Oct 21, 2023
1 parent 39efab6 commit e254e71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ license: MIT
dependencies:
selenium:
github: crystal-loot/selenium.cr
version: ~> 0.12.0
version: ~> 0.12
webdrivers:
github: crystal-loot/webdrivers.cr
version: ~> 0.4.2
version: ~> 0.4
habitat:
github: luckyframework/habitat
version: ~> 0.4.7
Expand Down
3 changes: 2 additions & 1 deletion src/lucky_flow/selenium/chrome/driver.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ end

LuckyFlow::Registry.register :headless_chrome do
LuckyFlow::Selenium::Chrome::Driver.new do |config|
config.chrome_options.args = ["no-sandbox", "headless", "disable-gpu"]
remote_debuggin_port = ENV["CHROME_REMOTE_DEBUGGING_PORT"]? || 9222
config.chrome_options.args = ["no-sandbox", "headless", "disable-gpu", "remote-debugging-port=#{remote_debuggin_port}"]
end
end

0 comments on commit e254e71

Please sign in to comment.