Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Run test locally" missing (+workaround) #6

Open
mfaure opened this issue Jan 20, 2016 · 7 comments
Open

"Run test locally" missing (+workaround) #6

mfaure opened this issue Jan 20, 2016 · 7 comments

Comments

@mfaure
Copy link

mfaure commented Jan 20, 2016

Hi,

Since the fork from SeBuilder to Selenium Builder, the feature Run test locally is missing.

As a workaround one can:

  • download Selenium server java and launch it with java -jar selenium-server-standalone-2.49.0.jar
  • then from the SeleniumBuilder Addons, do Run > Run on local server > Run (default parameters are OK).
  • a new firefox window will appear showing the recorded actions being played.

How could we be helpful to bring back the Run test locally feature to Selenium Builder ?

(cc @Zarkonnen @jkowalczyk)

@Zarkonnen
Copy link
Contributor

An update from the mailing list:

As you probably know, the newest versions of Selenium Builder, v3.0+, no longer have support for local playback of tests. The reason for this is that Mozilla now has stricter requirements for addons which the old local playback code did not meet. So in order to support Builder on the newest versions of Firefox, I had to remove local playback.

If you do really need local playback, you can still get Builder 2.3.5 from here: https://github.com/SeleniumBuilder/se-builder/blob/gh-pages/selenium-builder-2.3.5.xpi But note that the latest versions of Firefox will refuse to run it, as it isn't approved by Mozilla.

The question is: where do we go forward from here? Obviously, local playback is extremely useful for developing tests, so we really want it back. But local playback is only really useful if it behaves exactly the same as playback through a Selenium server. Otherwise, your tests will end up behaving wrongly.

So my original plan was to use Webdriver atoms as the common base to rebuild local playback on. Unfortunately, atoms relies heavily on Google closure libraries, which make heavy use of eval(), which is very much forbidden by the New Way of Mozilla.

This means the new local playback implementation is going to have to be completely separate code from the standard webdriver one. This shifts the focus on figuring out ways to guarantee parity between the two, probably by means of an extensive test suite.

My immediate plan is to recreate the GUI infrastructure for local playback in a branch of the Selenium Builder 3 project: https://github.com/SeleniumBuilder/selenium-builder/tree/local-playback And then implement a small number of basic commands: get, click, etc. If you're interested in aiding this effort, get in touch. Especially useful:

  • suggestions for which commands to implement first
  • a detailed set of tests for corner cases for each command
  • code review for the new command implementations
  • carefully thought-out and commented command implementations

@sachinahuja85
Copy link

Hello,

Does your above solution works for MAC as well? Unfortunately in MAC when I am trying to run command I get following error

Sachins-MacBook-Pro:nr_synthetics_formatter sachinahuja$ java -jar selenium-server-standalone-2.49.0.jar
Error: Unable to access jarfile selenium-server-standalone-2.49.0.jar

Can you please assist out?

Regards
Sachin Ahuja

@Zarkonnen
Copy link
Contributor

If you download the newest version of the server from here:
http://www.seleniumhq.org/download/

You should then be able to launch it using java -jar

On 10/03/16 18:35, sachinahuja85 wrote:

Hello,

Does your above solution works for MAC as well? Unfortunately in MAC
when I am trying to run command I get following error

Sachins-MacBook-Pro:nr_synthetics_formatter sachinahuja$ java -jar
selenium-server-standalone-2.49.0.jar
Error: Unable to access jarfile selenium-server-standalone-2.49.0.jar

Can you please assist out?

Regards
Sachin Ahuja


Reply to this email directly or view it on GitHub
#6 (comment).

@sachinahuja85
Copy link

Hi Zarkonmen,

Unfortunately downloading new software version doesn't resolve the issue. I am using MAC and the challenge which I am facing with Firefox 45.0 version with Selenium Builder 3.0.7 plugin is that it doesn't enables "Run script locally" in Selenium Builder :(. In addition I don't even see Export option 'New Relic Synthetics (WebDriverJS)' under Selenium Builder.

Do you have any idea what workaround can be available for this situation which I am stuck into right now.

Regards
Sachin Ahuja

@Zarkonnen
Copy link
Contributor

It doesn't enable "run script locally" - you can simply run the script on a Selenium server instance you can start up.

@rameshp286
Copy link

Hi,
I am unable to execute the script using (Run- Run script on Selenium server) Even if i start the selenium standalone server in CMD.
When i start server and run the script via builder. It opens the Firefox browser and not passing the url. after sometime gives Timeout error in Builder

I am using firefox Ver 48.0.1
Builder Ver 3.1.2
Java Vers1.7
Standalone server Ver2.53

Kindly Help...

Thanks in Advance.
Ramesh

@Debanjan-B
Copy link

@Zarkonnen Can you please confirm if I use the java -jar option to start Selenium 3.4.0 server locally, I can perform the tests with the latest Selenium Builder plugin with recent 53.x version of Mozilla Firefox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants