Skip to content
Snippets Groups Projects
Commit eef95fba authored by iaibrys's avatar iaibrys
Browse files

Re-add 2019 to domain suffix

parent c45f3118
Branches
No related tags found
No related merge requests found
Pipeline #312 passed
......@@ -85,7 +85,7 @@ module EnoteConfig
@use_wildcard_ssl_cert = true
@docker_version_tag = 'develop'
elsif "enote-2019" == @hostname
@enote_domain_suffix = ".compute.dtu.dk"
@enote_domain_suffix = "-2019.compute.dtu.dk"
@enote_domain = "enote" + @enote_domain_suffix
@allow_testing = false # do not allow testing in the real production system!
@public_facing = true
......
require 'selenium-webdriver'
require 'capybara'
#info
# https://dev.to/dstull/docker--rails--system-tests-with-headless-chrome-d00
# https://blog.testproject.io/2018/02/20/chrome-headless-selenium-python-linux-servers/
# https://gist.github.com/xiaol825/625b94f97c0580c0586ded2b8f0d76e2
# https://makandracards.com/makandra/49096-how-to-control-chromedriver-using-curl
# as normal user:
# chromedriver --versbose &
#curl -XPOST http://localhost:9515/session -d '{"desiredCapabilities":{"browserName":"chrome", "chromeOptions": { "args":["--nosandbox", "--headless"]}}}'
#driver = Chromedriver::Helper.new
#driver.update('2.46')
#Selenium::WebDriver::Chrome.driver_path = driver.binary_path
Capybara.register_driver :headless_chrome do |app|
=begin
options = Selenium::WebDriver::Chrome::Options.new(
args: %w[disable-gpu no-sandbox headless]
)
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
=end
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(
'chromeOptions' => {
'args' => ['headless', 'disable-gpu', 'no-sandbox', 'window-size=1280,1024'],
'binary' => %x{which google-chrome}
}.reject { |_k, v| v.nil? }
)
)
end
Capybara.javascript_driver = :chrome
session = Capybara::Session.new :headless_chrome
session.visit 'https://google.com'
### TRY THIS NEXT:
#https://stackoverflow.com/questions/45275586/how-to-use-chrome-options-in-ruby-selenium
args = %w[headless disable-gpu no-sandbox window-size=1280,1024]
options = Selenium::WebDriver::Chrome::Options.new(args: args)
driver = Selenium::WebDriver.for(:chrome, options: options)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment