Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

We're currently using the very lovely Robot Framework for our automation.

Unfortunately, we've run into a hitch with the '=' character - we have a number of places in the app where we have a link to click, and no other options for identifying that element. Unfortunately, the links generally have a query string that includes the '=' character, e.g.:

   ClickLink   href=https://foo.bar.com/admin_login.php?action=logoff&clients_id=mytestaccount.foo.bar.com

Because Watir-Robot is able to match on multiple html tags, when Robot parses the above string to Watir-Robot it is using the "=" as a seperator. Watir-Robot sees the above as...

   href=https://foo.bar.com/admin_login.php?action
   id=logoff&clients_id (if no tag is stated it will default to id)
   id=mytestaccount.foo.bar.com

hence not matching on any of them.

As workarounds, we've tried the following with no success:

  • Robot's built-in escape character, "\"
  • Wrapping the string in "" or ''
  • Replacing the "=" with the relevant html escape character "="
  • Creating the variable ${EQUALS} containing "=" (without quotes), this had the same results as leaving them in in the first place (as variables are rectified BEFORE they are parsed)

What's the best way of resolving this issue?

share|improve this question
    
Note: I've actually also asked this on the Robot mailing list, if I get an answer there I'll add it here. –  testerab Jun 3 '11 at 10:13
    
I don't know if there is a robot framework tag on the main StackOverflow site, but this might be better off being asked there. I know for Watir help posting to SO is preferred as more Watir folks monitor it than here. Not sure if the same is true of Robot Framework as well or not. –  Chuck van der Linden Jun 6 '11 at 7:11
add comment

1 Answer 1

testerab, you mentioned escaping the equals sign with the relevant HTML escape character. There are two kinds of encoding for special characters in HTML: entity notation and URL Encoding. In entity notation, an equals sign would be

&#x003D

In URL encoding, an equal sign would be

%3D

For your problem, the appropriate encoding would be URL encoding. If you haven't already, please give that a try.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.