Category : capybara

I have the following capybara config: Capybara.register_driver :chrome_headless do |app| media_tab_screen_size = ‘1280,800’ chrome_capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( loggingPrefs: { browser: ‘ALL’, client: ‘ALL’, driver: ‘ALL’, server: ‘ALL’ }, chromeOptions: { args: %W[no-sandbox disable-dev-shm-usage no-default-browser-check start-maximized headless disable-gpu window-size=#{media_tab_screen_size}] } ) if ENV[‘HUB_URL’] Capybara::Selenium::Driver.new(app, browser: :remote, url: ENV[‘HUB_URL’], desired_capabilities: chrome_capabilities) else Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: chrome_capabilities) end ..

Read more

I’m trying to configure capybara + rspec +selenoid, to run tests in headless mode. This is my configuration Capybara.default_max_wait_time = 5 Capybara.javascript_driver = :selenium_chrome_headless Capybara.current_driver = :selenium_chrome_headless caps = Selenium::WebDriver::Remote::Capabilities.new caps[‘browserName’] = ‘chrome’ caps[‘browserVersion’] = ‘88.0’ caps[‘"enableVNC"’] = ‘True’ Selenium::WebDriver.for( :remote, url: ‘http://localhost:4444/wd/hub’, desired_capabilities: caps ) I run My test – rspec spec/spec_test.rb: require_relative ‘../spec_helper.rb’ ..

Read more

I want to use a standalone container for integration specs with RSpecs in my docker setup. This is my docker-compose.yml # docker-compose.yml x-ata-development: &ata-development volumes: – ./tmp/capybara/:/usr/src/app/tmp/capybara – ./:/usr/src/app:delegated – /usr/src/app/tmp build: . version: "3.4" services: ata: <<: *ata-development ports: – 3000:3000 – 6006:6006 – 9229:9229 command: bash -c "bundle exec rails s -b 0.0.0.0" ..

Read more

I am trying to write a Dockerfile to run a Ruby Capybara scraper on a docker container. I tested the following code on my host OS. But it is making an error on a docker container. Dockerfile FROM ruby:2.6.6 RUN apt-get update -y && apt-get install -y xvfb RUN wget https://ftp.mozilla.org/pub/firefox/releases/80.0.1/linux-x86_64/en-US/firefox-80.0.1.tar.bz2 RUN tar -xjf firefox-80.0.1.tar.bz2 ..

Read more

I am trying to setup docker-compose with subdomains. So that I could execute specs on different app_host. Currently my docker-compose looks as follow: version: ‘3’ services: webapp: container_name: webapp depends_on: – postgres – elasticsearch – redis build: . volumes: – .:/webapp entrypoint: sh /webapp/setup.sh ports: – “3000:3000” environment: – REDISTOGOURL=redis://redis:6379 – ELASTICSEARCH_URL=http://elasticsearch:9200 postgres: container_name: postgres ..

Read more

I have a docker-compose.yml as given below with service defined for selenium using selenium/standalone-chrome-debug image. # docker-compose.yml version: ‘3’ services: webapp: tty: true stdin_open: true container_name: webapp depends_on: – postgres – elasticsearch – redis – selenium build: . volumes: – .:/webapp ports: – “3000:3000” entrypoint: sh /webapp/setup.sh environment: – REDISTOGO_URL=redis://redis:6379 – ELASTICSEARCH_URL=http://elasticsearch:9200 – SELENIUM_HOST=selenium – ..

Read more