crystal-loot / selenium.cr

Selenium library for Crystal
https://crystal-loot.github.io/selenium.cr/
MIT License
24 stars 7 forks source link

Error: undefined constant TCPSocket #8

Closed jwoertink closed 3 years ago

jwoertink commented 3 years ago

I'm attempting to hand roll some usage here, but I'm probably missing some setup.

require "selenium"

driver = Selenium::Driver.for(:chrome)
capabilities = Selenium::Chrome::Capabilities.new
capabilities.args(["no-sandbox", "headless", "disable-gpu"])
driver.create_session(capabilities)

This fails to compile with:

In lib/selenium/src/selenium/service.cr:68:5

 68 | TCPSocket.new("localhost", @port).close
      ^
Error: undefined constant TCPSocket
matthewmcgarvey commented 3 years ago

@jwoertink will you try updating to 0.6.1 and seeing if it's fixed now?

jwoertink commented 3 years ago

Yeah, that fixes that error at least 😅 thanks!