Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:43:41+00:00 2026-06-06T14:43:41+00:00

I have a ruby script that opens a browser. I have it set to

  • 0

I have a ruby script that opens a browser. I have it set to open Firefox first and then Chrome if FF fails for some reason – like FF gets updated and Selenium hasn’t caught up yet.

The wait function/definition works fine for FF but always breaks Chrome. Here is the relevant code for the Chrome browser startup:

b = Selenium::WebDriver.for :chrome
b.driver.manage.timeouts.implicit_wait = $BROWSER_IMPLICIT_WAIT

I’m fairly new to Selenium still and I user the wait.until command after declaring something like:

wait = Selenium::WebDriver::Wait.new(:timeout => $BROWSER_EXPLICIT_WAIT)

The above lines of code work fine in Firefox. However, I’d like to run my scripts with both FF and Chrome. Is there a way to do this in Chrome and FF?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:43:42+00:00Added an answer on June 6, 2026 at 2:43 pm

    See now that you provide the error it gets easier to solve.

    The reason is that – you have named the selenium driver instance as b

    but defining the implicit time as

    b.driver.manage.timeouts.implicit_wait = $BROWSER_IMPLICIT_WAIT

    ie with b.DRIVER, hence the error message – undefined method 'driver' for

    change your command to

    b.manage.timeouts.implicit_wait = $BROWSER_IMPLICIT_WAIT
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one ruby script that I want to run with some flags
I have a Ruby script that generates a sed command to replace some PHP
I have written a ruby script that then calls another ruby script. The callee
so i have ruby script that simply writes to a test.txt file with hello
I have a ruby script that does a few perforce operations (through the scripting
I have a ruby script that is simultaneously and asynchronously receiving and displaying messages
I have this ruby script that allows me to enter the name of a
I have a Ruby 1.8.6 script that is supposed to take a filename that
I have a ruby script, which declare the ruby path in the first line
I have a Ruby script that generates an ANSI file. I want to convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.