Amey
Amey

Reputation: 8548

setSpeed in Selenium WebDriver using Ruby

Is there a way to set the Selenium Webdriver execution speed in ruby.

In perl for selenium 1(RC) there was $sel->set_speed("500");

But due to some constraints of Selenium RC, I had to shift to Selenium Webdriver and had to start using Ruby, and I cannot find the function for the same.

Read somewhere the options "Slow", "Medium" and "Fast" as arguments to set speed in C# and Perl, but not in Ruby.

Note - I do have timeouts set with this @driver.manage.timeouts.implicit_wait = 30 but i am looking for execution speed.

Upvotes: 7

Views: 17776

Answers (2)

JimEvans
JimEvans

Reputation: 27486

The methods to set the execution speed in WebDriver were deprecated for all language bindings some time ago. It is no longer possible to modify the execution speed of the running WebDriver code.

Upvotes: 10

VMykyt
VMykyt

Reputation: 1629

According to the http://selenium.googlecode.com/svn/tags/selenium-2.10.0/rb/lib/selenium/client/idiomatic.rb in there are 2 methods Selenium.Client.Idiomatic module:

  # Get execution delay in milliseconds, i.e. a pause delay following 
  # each selenium operation. By default, there is no such delay 
  # (value is 0).
  def execution_delay
    string_command "getSpeed"
  end

  # Set the execution delay in milliseconds, i.e. a pause delay following
  # each selenium operation. By default, there is no such delay.
  #
  # Setting an execution can be useful to troubleshoot or capture videos
  def execution_delay=(delay_in_milliseconds)
    remote_control_command "setSpeed", [delay_in_milliseconds]
  end

I suppose this will help.

Upvotes: 0

Related Questions