diff --git a/shard.yml b/shard.yml index 8530cc8..be80b91 100644 --- a/shard.yml +++ b/shard.yml @@ -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 @@ -27,4 +27,4 @@ dependencies: development_dependencies: ameba: github: crystal-ameba/ameba - version: ~> 1.4.3 + version: ~> 1.5 diff --git a/src/lucky_flow/selenium/chrome/driver.cr b/src/lucky_flow/selenium/chrome/driver.cr index 6cae6e8..ee52fc8 100644 --- a/src/lucky_flow/selenium/chrome/driver.cr +++ b/src/lucky_flow/selenium/chrome/driver.cr @@ -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