Re: [wtr-general] Jssh Socket error

2011-04-21 Thread Angrez Singh
Which OS you are using? Which Firefox version are you using?

- Angrez

On Wed, Apr 20, 2011 at 6:01 PM, prathibha m prathibha.a...@gmail.comwrote:

 I installed ruby 1.8.7 version
 and gems 1.7.2 version
 i installed firewatir  and also the firefox extension JSSH 0.9
 I witten a simple google test script. first time the script run
 successfully.
 But I am trying to run the script second time it will give the errors
 like

 /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
 jssh_socket.rb:19:in `js_eval':  this.docShell is null
 (JsshSocket::JSTypeError)
from /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
 firefox.rb:194:in `set_browser_document'
from /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
 firefox.rb:104:in `goto'
from watir_script1.rb:4

 If I install JSSH extension again then it run properly. So the problem
 is I have install the Jssh extension every time, i want to run the
 script.

 So please solve my problem as early as possible.


 Advanced thanks

 Prathibha

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Watir 1.6.5 tests on IE8 - very slow execution

2011-04-21 Thread psdd
Hi,
Environment: Windows 2008 R2 server, (default 64 bit)
Browser: IE8 (cannot downgrade since it is windows 2008 server)
Watir version : 1.6.5
Ruby version : 1.8.7

When watir tests are run, it is extremely slow and takes around 10-20
mins to complete a simple test which otherwise in IE7, windows XP
machine (32 bit), Ruby 1.8.6 would take 2 mins to execute.

Any ideas if IE8 is the issue or Ruby version.

Regards,
PS

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Watir 1.6.5 tests on IE8 - very slow execution

2011-04-21 Thread Željko Filipin
On Thu, Apr 21, 2011 at 9:24 AM, psdd pals.sha...@gmail.com wrote:
 Watir version : 1.6.5

Why are you using an old version of Watir?

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host
viaqa.mobi conference on software testing - organizer

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Jssh Socket error

2011-04-21 Thread prathibha m
Ubuntu 10.10 OS.
FireFox 3.6.16.

On Apr 21, 11:01 am, Angrez Singh ang...@gmail.com wrote:
 Which OS you are using? Which Firefox version are you using?

 - Angrez

 On Wed, Apr 20, 2011 at 6:01 PM, prathibha m prathibha.a...@gmail.comwrote:







  I installed ruby 1.8.7 version
  and gems 1.7.2 version
  i installed firewatir  and also the firefox extension JSSH 0.9
  I witten a simple google test script. first time the script run
  successfully.
  But I am trying to run the script second time it will give the errors
  like

  /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
  jssh_socket.rb:19:in `js_eval':  this.docShell is null
  (JsshSocket::JSTypeError)
         from /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
  firefox.rb:194:in `set_browser_document'
         from /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
  firefox.rb:104:in `goto'
         from watir_script1.rb:4

  If I install JSSH extension again then it run properly. So the problem
  is I have install the Jssh extension every time, i want to run the
  script.

  So please solve my problem as early as possible.

  Advanced thanks

  Prathibha

  --
  Before posting, please readhttp://watir.com/support. In short: search
  before you ask, be nice.

  watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
  watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0Awatir-general+unsubscr...

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir 1.6.5 tests on IE8 - very slow execution

2011-04-21 Thread psdd
I had installed watir 1.8 and could never get past wait statements
I have a lot of wait statements to wait for page after postback and
with watir 1.8, it used to indefnitely wait at wait statements. So
tried installing 1.6.5 and it worked but it is really v. slow.
I have used  Watir::Waiter.wait_until which had been used when the
code was written in watir 1.6.5
Basically am trying to run the same code on a different machine.


On Apr 21, 12:31 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Thu, Apr 21, 2011 at 9:24 AM, psdd pals.sha...@gmail.com wrote:
  Watir version : 1.6.5

 Why are you using an old version of Watir?

 Željko
 --
 watir.com - community manager
 watir.com/book - author
 watirpodcast.com - host
 viaqa.mobi conference on software testing - organizer

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Moving a window

2011-04-21 Thread Željko Filipin
On Thu, Apr 21, 2011 at 3:18 AM, Abe Heward abe.hew...@gmail.com wrote:
 Is scrollIntoView strictly an IE thing?

No.

Try something like this:

browser.element(how, what).scrollIntoView

I do not have firewatir installed so I can not test it, but I remember using
it.

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host
viaqa.mobi conference on software testing - organizer

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Jssh Socket error

2011-04-21 Thread Angrez Singh
As per what I know you have to start firefox first with -jssh option and
then run the test script.
Test script won't start Firefox. Every time you have to run a script you
have to first start Firefox with -jssh option

- Angrez

On Thu, Apr 21, 2011 at 1:37 PM, prathibha m prathibha.a...@gmail.comwrote:

 Ubuntu 10.10 OS.
 FireFox 3.6.16.

 On Apr 21, 11:01 am, Angrez Singh ang...@gmail.com wrote:
  Which OS you are using? Which Firefox version are you using?
 
  - Angrez
 
  On Wed, Apr 20, 2011 at 6:01 PM, prathibha m prathibha.a...@gmail.com
 wrote:
 
 
 
 
 
 
 
   I installed ruby 1.8.7 version
   and gems 1.7.2 version
   i installed firewatir  and also the firefox extension JSSH 0.9
   I witten a simple google test script. first time the script run
   successfully.
   But I am trying to run the script second time it will give the errors
   like
 
   /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
   jssh_socket.rb:19:in `js_eval':  this.docShell is null
   (JsshSocket::JSTypeError)
  from /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
   firefox.rb:194:in `set_browser_document'
  from /usr/lib/ruby/gems/1.8/gems/firewatir-1.8.1/lib/firewatir/
   firefox.rb:104:in `goto'
  from watir_script1.rb:4
 
   If I install JSSH extension again then it run properly. So the problem
   is I have install the Jssh extension every time, i want to run the
   script.
 
   So please solve my problem as early as possible.
 
   Advanced thanks
 
   Prathibha
 
   --
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   watir-general@googlegroups.com
  http://groups.google.com/group/watir-general
   watir-general+unsubscr...@googlegroups.com
 http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Sending single key presses to element.

2011-04-21 Thread Alastair Montgomery


Having talked with our developers we would only need to be able to fire the 
following events;
keydown, keyup, mousedown, mouseup and paste.

So really need a way of being able to pass a key code with the keydown and 
keyup events for WATIR and FIREWATIR?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
Unfortunately that just fails with an unknown method error.

There aren't any text fields in the part of the screen that I want to get 
to. Perhaps this method only works with text fields?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Moving a window

2011-04-21 Thread GJHmf
I tried this method after seeing this thread as it got me curious as
I'd never seen it before; and got the same error.  I dug a little
deeper, and found you'll possibly need to add in an extra command.
Does this work for you?

browser.element(how, what).document.scrollIntoView

such as...

browser.button(:id, btnSave).document.scrollIntoView




On Apr 21, 2:51 pm, Abe Heward abe.hew...@gmail.com wrote:
 Unfortunately that just fails with an unknown method error.

 There aren't any text fields in the part of the screen that I want to get
 to. Perhaps this method only works with text fields?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Slow speed of filling of text area on watir-webdriver

2011-04-21 Thread Jari Bakken
On Thu, Apr 21, 2011 at 5:07 PM, the_zonker the.zonk...@gmail.com wrote:
 Environment:
 watir-webdriver 2.0.0
 Ruby 1.9.2
 Firefox 3.6, IE8


It's a good practice to always try the latest released version before
reporting issues. watir-webdriver is currently at 0.2.2.

 I faced with a problem - I need to put a content of XML file into text
 area.
 The content  is quite long and the process of filling is extremely
 slow.

 This slowness of filling causes a timeout error:

How long is the string? WebDriver simulates native key presses on some
platforms (like Windows), which may be slow.



 For putting value into text area I use:
  text_area.set(value)

 Are there any other ways to fill in text area more quick?
 I tried Javascript via execute_script method but JavaScript cannot
 handle XML content (probably because of quotes) as a valid element
 value.

Using execute_script should work. If you could provide an example
string where it doesn't work, I could probably help you out. Another
approach is to do what a user would do: paste in the XML from the
clipboard. If you have the XML content on the clipboard, you should be
able to do that by sending Control-V:

  text_area.send_keys [:control, 'v']

Jari

PS. The full list of keys you can send can be found here:
http://selenium.googlecode.com/svn/trunk/rb/lib/selenium/webdriver/common/keys.rb

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
My code:

$ff.checkbox(:id, stdOptOut).document.scrollIntoView

Error result:

test.rb:7:in `main': undefined method `scrollIntoView' for :String 
(NoMethodError)

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Moving a window

2011-04-21 Thread orde
I use scrollintoview on IE7/8 + WinXP/7 without any errors (usually on
div tags to reorient the page above the fold).  Example:

browser.div(how, what).document.scrollintoview

orde

On Apr 21, 8:24 am, Abe Heward abe.hew...@gmail.com wrote:
 My code:

 $ff.checkbox(:id, stdOptOut).document.scrollIntoView

 Error result:

 test.rb:7:in `main': undefined method `scrollIntoView' for :String
 (NoMethodError)

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Sending single key presses to element.

2011-04-21 Thread orde
You should able to accomplish it through either .fire_event
or .send_keys methods.  Examples:

fire_event: 
http://rdoc.info/gems/watir/1.8.1/Watir/Element#fire_event-instance_method
send_keys: http://rdoc.info/gems/watir/1.8.1/Watir/IE#send_keys-instance_method

But I think that send_keys only works with IE.  Hope it helps.

orde


On Apr 21, 2:55 am, Alastair Montgomery doodl...@gmail.com wrote:
 Having talked with our developers we would only need to be able to fire the
 following events;
 keydown, keyup, mousedown, mouseup and paste.

 So really need a way of being able to pass a key code with the keydown and
 keyup events for WATIR and FIREWATIR?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Slow speed of filling of text area on watir-webdriver

2011-04-21 Thread Adam Reed
Using text_area.value = string rather than text_area.set string has
saved a significant amount of time for my scripts in massive-data-
entry scenarios.

On Apr 21, 10:14 am, Jari Bakken jari.bak...@gmail.com wrote:
 On Thu, Apr 21, 2011 at 5:07 PM, the_zonker the.zonk...@gmail.com wrote:
  Environment:
  watir-webdriver 2.0.0
  Ruby 1.9.2
  Firefox 3.6, IE8

 It's a good practice to always try the latest released version before
 reporting issues. watir-webdriver is currently at 0.2.2.

  I faced with a problem - I need to put a content of XML file into text
  area.
  The content  is quite long and the process of filling is extremely
  slow.

  This slowness of filling causes a timeout error:

 How long is the string? WebDriver simulates native key presses on some
 platforms (like Windows), which may be slow.



  For putting value into text area I use:
   text_area.set(value)

  Are there any other ways to fill in text area more quick?
  I tried Javascript via execute_script method but JavaScript cannot
  handle XML content (probably because of quotes) as a valid element
  value.

 Using execute_script should work. If you could provide an example
 string where it doesn't work, I could probably help you out. Another
 approach is to do what a user would do: paste in the XML from the
 clipboard. If you have the XML content on the clipboard, you should be
 able to do that by sending Control-V:

   text_area.send_keys [:control, 'v']

 Jari

 PS. The full list of keys you can send can be found 
 here:http://selenium.googlecode.com/svn/trunk/rb/lib/selenium/webdriver/co...

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
Still get the same error. Oh well.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Moving a window

2011-04-21 Thread Charley Baker
My guess, not tested is that you'll have to fire an event on element in
Firewatir. This isn't the cleanest api right now, but scrollIntoView on IE
is a direct call into the underlying ole object. In Firewatir, it'd be a js
call, similar to this:
http://www.roseindia.net/javascript/javascript-scrollintoview.shtml on the
DOM element.

Something we definitely need a common api for, right now it's a leaky
abstraction in IE Watir. Can you add a Jira ticket for this?


Charley Baker
Lead Developer, Watir, http://watir.com


On Thu, Apr 21, 2011 at 12:49 PM, Abe Heward abe.hew...@gmail.com wrote:

 Still get the same error. Oh well.

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
Done: http://jira.openqa.org/browse/WTR-475

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Re: Slow speed of filling of text area on watir-webdriver

2011-04-21 Thread Jari Bakken
On Thu, Apr 21, 2011 at 8:33 PM, Adam Reed reed.a...@gmail.com wrote:
 Using text_area.value = string rather than text_area.set string has
 saved a significant amount of time for my scripts in massive-data-
 entry scenarios.


Not so for watir-webdriver - they both use the same mechanism under
the hood (which in some cases means native key press events).

Jari

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir 1.6.5 tests on IE8 - very slow execution

2011-04-21 Thread Darryl Brown
Howdy,

1) Upgrade to the latest Watir version.

2) Use -
Watir::Wait.until(2) {$ie.text_field(:name, q).exists?}

This is an example waiting up to 2 seconds for the search box on the
Google home page to be present.


Regards,
Darryl


On Apr 21, 4:30 am, psdd pals.sha...@gmail.com wrote:
 I had installed watir 1.8 and could never get past wait statements
 I have a lot of wait statements to wait for page after postback and
 with watir 1.8, it used to indefnitely wait at wait statements. So
 tried installing 1.6.5 and it worked but it is really v. slow.
 I have used  Watir::Waiter.wait_until which had been used when the
 code was written in watir 1.6.5
 Basically am trying to run the same code on a different machine.

 On Apr 21, 12:31 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:

  On Thu, Apr 21, 2011 at 9:24 AM, psdd pals.sha...@gmail.com wrote:
   Watir version : 1.6.5

  Why are you using an old version of Watir?

  Željko
  --
  watir.com - community manager
  watir.com/book - author
  watirpodcast.com - host
  viaqa.mobi conference on software testing - organizer

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Watir simple field recorder

2011-04-21 Thread Darryl Brown
I don't personally use 'recorders' but tools like this are an immense
help for getting new team members up to speed until they get a grasp
on effectively using Firebug. There are no Watir recorders per se.
However, tools such as this one and Webmetrics offer help to new
testers that don't have a programming background and I think that they
should be encouraged for the purpose of capturing objects.


Babitha - If you want to easily share your version of the tool with
the group, you can use  http://pastie.org/   just paste and
paste(post).

Here's an example  - http://pastie.textmate.org/1777913


Darryl

On Apr 20, 4:46 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Fri, Apr 1, 2011 at 7:26 PM, Babitha babitha.augus...@gmail.com wrote:
  I could share this script if anybody was interested. But, I am not
  sure where I can upload it.

 You will find that Watir community does not like recorders. You can upload
 it on your site, github, or you can take over watir recorder project at
 openqa.org.

 Željko
 --
 watir.com - community manager
 watir.com/book - author
 watirpodcast.com - host
 viaqa.mobi conference on software testing - organizer

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com