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

  • Home
  • SEARCH
  • 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 9054421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:41:11+00:00 2026-06-16T13:41:11+00:00

I am new to Watir WebDriver. I was playing around with this framework and

  • 0

I am new to Watir WebDriver. I was playing around with this framework and I included the below code but the second line is not working

$b = Watir::Browser.new :ie #browser
$b.goto "www.yahoo.com" 
$b.link(:text => "Sign up").when_present.click

I dont know why it is not getting the sign up link. I saw the source on Yahoo and it is as follows

<span class="tab-caption small y-txt-2">New here? <a href="http://hsrd.yahoo.com/_ylt=A2KLtVHgLNtQHnMBTk.bvZx4/SIG=13tjppi7u/EXP=1356627552/**https%3A//edit.yahoo.com/registration%3F.src=fpctx%26.intl=us%26.done=http%253A%252F%252Fwww.yahoo.com%252F" class="y-link-1">Sign Up</a></span>   

What is the problem with my code? I also tried without when_present and it says the element is not visible.

  • 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-16T13:41:13+00:00Added an answer on June 16, 2026 at 1:41 pm

    Locating elements via text is case-sensitive.

    Since the link says “Sign Up”, your locator also needs to say “Sign Up” (not “Sign up”):

    $b.link(:text => "Sign Up").when_present.click
    

    Note that if you want to make the locator case-insensitive, you can use a regular expression with the ignore case modifier:

    $b.link(:text => /sign up/i).when_present.click
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New programmer here, I am trying to understand and break down this code below
Now i have such watir code: require watir-webdriver browser = Watir::Browser.new :ff browser.driver.manage.timeouts.implicit_wait =
Ruby 1.9.3p327 watir-webdriver 0.6.1 I have some code which works on one computer but
Here is the .rb program: require 'watir' b = Watir::Browser.new the 2nd line will
Using watir-webdriver for automation I'm not able to handle Firefox Untrusted Connection . Already
Here is the Watir code I am using: require 'watir-classic' browser = Watir::IE.new browser.link(:class,
I am new to watir-webdriver automation, apologies if its a basic question of automation.
I'm working simultaneously with Watir and Watir-WebDriver and am trying to make them more
I'm attempting to launch chrome using watir-webdriver but with a specific extension loaded. I
Another watir issue. This code works until add_task ... After login, the auth window

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.