Export to Ruby from Selenium IDE 2.5.0 doesn't replace ${receiver}

2,486 views
Skip to first unread message

Daria Mehra

unread,
Jan 2, 2014, 3:29:33 PM1/2/14
to seleniu...@googlegroups.com
Hi, I'm new to Selenium IDE (using the latest 2.5.0), just tried my first test and exported it to Ruby / RSpec / WebDriver (using File -> Export Testcase As menu option, as per documentation). The ruby file cannot be run due to syntax errors:

`${' is not allowed as a global variable name (SyntaxError)

The reason is that ${receiver} variable is left in the file, not replaced with @driver.

    ${receiver}.find_element(how, what)

If I manually replace ${receiver} with @driver, then the file runs just fine.

This looks like the issue 6129 which was fixed in October 2013, but the newest IDE version 2.5.0 (released on Jan 1st, 2014) doesn't appear to contain the fix.

http://code.google.com/p/selenium/issues/detail?can=2&q=6129&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&id=6129

Please advise on how I can pick up the fix, if this is indeed the same known issue.

dd_qa

unread,
Apr 2, 2014, 10:48:54 PM4/2/14
to seleniu...@googlegroups.com
Thanks for this fix

hen...@front.no

unread,
Oct 29, 2014, 10:27:32 AM10/29/14
to seleniu...@googlegroups.com
Same issue here. 

Eric Culp

unread,
Jun 4, 2015, 11:27:14 PM6/4/15
to seleniu...@googlegroups.com
This issue still exists. Is there a release planned? This bug is fairly annoying.

Dano Lee

unread,
Jul 6, 2016, 4:03:08 AM7/6/16
to Selenium Users
Same issue here.

Nicholas Dunbar

unread,
Nov 8, 2016, 11:34:18 PM11/8/16
to Selenium Users
Does anyone have a link to a formatter without this problem?

I have this problem as well in the Firefox add-on Selenium IDE 2.9.1.1-signed. One should be able to fix this problem by editing the formatter and eliminating the ${receiver} syntax. By opening up the SE IDE and clicking options -> formatts -> Ruby /Rspec / Webdriver -> source. Copy the contents of source to a file so you can work on it. This is where I don't know what to do. How to change this file so it is no longer dependent on the $receiver syntax is beyond me. Also I noticed that Rspec 3.0 does not support the :should syntax and uses :expect instead so I'd like to update that as well in the formatter. After one has edited this file they should be able to click "Add" -> "Source" and cut and paste this file into a new custom formatter.

Dominik Pich

unread,
Jan 24, 2017, 12:50:59 AM1/24/17
to Selenium Users
Same here - doesnt seem fixed to me
Reply all
Reply to author
Forward
0 new messages