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 8078707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:52:53+00:00 2026-06-05T15:52:53+00:00

I have this code: ie1.link(:text, /Exception:/) It is producing an error message which I

  • 0

I have this code:

ie1.link(:text, /Exception:/) 

It is producing an error message which I want include to my report. I use the following method to create reports – http://wiki.openqa.org/display/WTR/HTML+report+class.

The output of each step in the test is described in this line:

 def addtoReport(reportName, step, result, description)

The description’s type is string. I write this code:

 h = ie1.link(:text, /Exception:/)
 r.addtoReport(testReport, "check insert", "FAILED", h )

But I get the error:

E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/CLReport.rb:150:in `+': can't convert Watir::Link into String (TypeError)
from E:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.0.0/lib/watir-classic/CLReport.rb:150:in `addtoReport'
from file.rb:96:in `<main>'
  • 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-05T15:52:55+00:00Added an answer on June 5, 2026 at 3:52 pm

    Assuming you want the text of the link, you should be using h.text.

    So either state you want the text attribute of h:

    h=ie1.link(:text, /Exception:/)
    r.addtoReport(testReport, "check insert", "FAILED", h.text )
    

    or save the text as h:

    h=ie1.link(:text, /Exception:/).text
    r.addtoReport(testReport, "check insert", "FAILED", h)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: myVariable which I want to change into trace(myVariable: + myVariable);
I have this code : button { } a:link, a:visited { text-decoration:none; color:red; }
I have this code that throws a math domain error exception: v = -1.0
I have this code inside a iframe: window.addEventListener('message', function(e){ if(e.data == 'test') console.log(e); },
I have this code which export data from GridView to csv. It works with
I have this code: <label for=subject accesskey=S>Subject</label> <select name=subject type=text id=subject> <option value=a dog>Dog</option>
I have this code: <div class = content-dir-item> <p>Text input</p> <img src=./images/email.png class =
I have this code which getting html code of page and than replace all
I have this code which calculates the sum of "letter numbers" in a string,
i have this code which doesnt work: void CAnalyzerIF::SetData(int i_iIters, const CParameterSet* i_CParameterSet) {

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.