Re: [wtr-general] Re: Recent Stack Overflow Questions Tagged Watir

2011-03-16 Thread Željko Filipin
http://stackoverflow.com/questions/5317433/ruby-stops-after-first-loop

-- 
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] Click on the link in a cell of a table

2011-03-16 Thread Aravind
Hi

I have a table in the page with few columns like Action, name, status etc.
Under action i have links and based on the status i have to click on the
link under action.

Ex: If status is APV click on the link under action.

Can any one help with the code

thanks
aravind

-- 
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: click Div button

2011-03-16 Thread vin
Regret for the delay since i was OOO.

Thanks everyone!! its working with fireevent.

 ie.div(:id, "configure_access_left").fireEvent("onmouseup")

Regards,
vin

On Mar 3, 11:14 pm, Chuck van der Linden  wrote:
> 'access'  appears to be text..  do you see it on the page as text next
> to a 'FolderOpen" image?  Is that text unique on the screen, or does
> it appear in other places as well?
>
> The problem we are faced with here is that there are several
> overlapping HTML elements here, and none of the HTML types used here
> are normally 'reactive' on their own to being clicked.  (as opposed to
> an  type such as a button)   So there is somewhere that we
> cannot see here, behind the scenes 'plumbing' that sets up some of
> those elements to be sensitive to specific events, and run specific
> javscript when the events occur.  I suspect this is configured at a
> class or style level, but unless you really want to dig around in the
> controls code that doesn't much matter.  The issue is that of this
> sort of 'stack' of elements, we don't know which one is responsive to
> the click.. furthermore we don't know if it's looking for onclick,
> onmousedown, onmouseup, or whatever.
>
> What you have going in your favor is you know the ID of the outer
> container, whcih makes it easier to try and click on it, OR one of the
> inner ones..
>
> You've got (periods used to force spacing)
>
>  style="font-size: 11px; top: 6px;">
> . .
> . . . 
> . . . . 
> . . . .  Access
> . . . 
>
> What I would do is mess around using IRB to try clicking on each of
> these in turn using something like what I have below, and see if just
> a basic click on one of these works.
>
> browser.div(:id, "configure_access_left").click
> browser.div(:id, "configure_access_left").div(:class, "transparent-
> bwrap").click
> browser.div(:id, "configure_access_left").div(:class, "transparent-
> body transparent-body-noheader").click
> browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> images/FolderOpen.gif").click
>
> The ones after the first are effectively saying 'look inside the div
> with the id configure_access_left and find the div with class  and
> click on it)  notice that you don't need to specify the entire path or
> nesting as you would with xpath.  All that is needed is enough UNIQUE
> identifiers (or a combination that is unique) for watir to find the
> element you want.
>
> If that doesn't work, then you may have to try firing events such as
> onmousedown or onmouseup in place of the click.
>
> The other thing I'd strongly suggest is perhaps contacting the support
> folks for EXTJS, explain you are trying to automate testing of the
> site using their controls, and see if they can tell you what event (or
> sequence of events) needs to be fired at which class of divs in order
> to effect a 'click'
>
> On Mar 2, 9:52 pm, vin  wrote:
>
> > I need to use the first div which as static ID as
> > "configure_access_left":
>
> > I have tried below methods but its not working:
> > b.div(:id, "configure_access_left").click
> > b.div(:id, "ext-gen236").click
>
> > Also please let me know if i can make use of Access (marked <<<) to
> > achieve required click operation?
> > ###
> > . > style="font-size: 11px; top: 6px;">
> > 
> > 
> > 
> >  Access  <<<
> > 
> > 
> > 
> > 
> > 
> > 
>
> > Thanks,

-- 
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: click Div button

2011-03-16 Thread vin
Stuck with new issue!!! :(

When i launch the browser with ruby interactive it shows the time
(which is important for my scripting) but the time is not showing up
with fireevent method.

irb(main):004:0* b = Watir::Browser.new
=> #
irb(main):005:0>
irb(main):006:0* b.goto "http://srx-blue";
=> 1.96875 <<< b.div(:id,
"configure_access_left").fireEvent("onmouseup")
=>
nil
<<< shows as nill
irb(main):008:0>

As shown above, with fireevent i could  able to navigate to required
page but it returns "nil" instead of time. Please suggest if any
alternative.

Thanks again for all your support.


On Mar 16, 5:15 pm, vin  wrote:
> Regret for the delay since i was OOO.
>
> Thanks everyone!! its working with fireevent.
>
>  ie.div(:id, "configure_access_left").fireEvent("onmouseup")
>
> Regards,
> vin
>
> On Mar 3, 11:14 pm, Chuck van der Linden  wrote:
>
> > 'access'  appears to be text..  do you see it on the page as text next
> > to a 'FolderOpen" image?  Is that text unique on the screen, or does
> > it appear in other places as well?
>
> > The problem we are faced with here is that there are several
> > overlapping HTML elements here, and none of the HTML types used here
> > are normally 'reactive' on their own to being clicked.  (as opposed to
> > an  type such as a button)   So there is somewhere that we
> > cannot see here, behind the scenes 'plumbing' that sets up some of
> > those elements to be sensitive to specific events, and run specific
> > javscript when the events occur.  I suspect this is configured at a
> > class or style level, but unless you really want to dig around in the
> > controls code that doesn't much matter.  The issue is that of this
> > sort of 'stack' of elements, we don't know which one is responsive to
> > the click.. furthermore we don't know if it's looking for onclick,
> > onmousedown, onmouseup, or whatever.
>
> > What you have going in your favor is you know the ID of the outer
> > container, whcih makes it easier to try and click on it, OR one of the
> > inner ones..
>
> > You've got (periods used to force spacing)
>
> >  > style="font-size: 11px; top: 6px;">
> > . .
> > . . . 
> > . . . . 
> > . . . .  Access
> > . . . 
>
> > What I would do is mess around using IRB to try clicking on each of
> > these in turn using something like what I have below, and see if just
> > a basic click on one of these works.
>
> > browser.div(:id, "configure_access_left").click
> > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > bwrap").click
> > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > body transparent-body-noheader").click
> > browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> > images/FolderOpen.gif").click
>
> > The ones after the first are effectively saying 'look inside the div
> > with the id configure_access_left and find the div with class  and
> > click on it)  notice that you don't need to specify the entire path or
> > nesting as you would with xpath.  All that is needed is enough UNIQUE
> > identifiers (or a combination that is unique) for watir to find the
> > element you want.
>
> > If that doesn't work, then you may have to try firing events such as
> > onmousedown or onmouseup in place of the click.
>
> > The other thing I'd strongly suggest is perhaps contacting the support
> > folks for EXTJS, explain you are trying to automate testing of the
> > site using their controls, and see if they can tell you what event (or
> > sequence of events) needs to be fired at which class of divs in order
> > to effect a 'click'
>
> > On Mar 2, 9:52 pm, vin  wrote:
>
> > > I need to use the first div which as static ID as
> > > "configure_access_left":
>
> > > I have tried below methods but its not working:
> > > b.div(:id, "configure_access_left").click
> > > b.div(:id, "ext-gen236").click
>
> > > Also please let me know if i can make use of Access (marked <<<) to
> > > achieve required click operation?
> > > ###
> > > . > > style="font-size: 11px; top: 6px;">
> > > 
> > > 
> > > 
> > >  Access  <<<
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
>
> > > Thanks,

-- 
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: click Div button

2011-03-16 Thread vin
Stuck with another issue!!

With ruby interactive i could see the time while accessing the
browser(which is important in my scripting) but for fireevent the
value is "nil" as shown:

irb(main):004:0* b = Watir::Browser.new
=> #
irb(main):005:0>
irb(main):006:0* b.goto "http://srx-blue";
=> 1.96875 <
irb(main):007:0> b.div(:id,
"configure_access_left").fireEvent("onmouseup")
=> nil  <<

Please let me know if any alternative and to update, below methods did
not help to click the div button except fireEvent("onmouseup").
browser.div(:id, "configure_access_left").click
browser.div(:id, "configure_access_left").div(:class, "transparent-
bwrap").click
browser.div(:id, "configure_access_left").div(:class, "transparent-
body transparent-body-noheader").click
browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
images/FolderOpen.gif").click



On Mar 16, 5:15 pm, vin  wrote:
> Regret for the delay since i was OOO.
>
> Thanks everyone!! its working with fireevent.
>
>  ie.div(:id, "configure_access_left").fireEvent("onmouseup")
>
> Regards,
> vin
>
> On Mar 3, 11:14 pm, Chuck van der Linden  wrote:
>
> > 'access'  appears to be text..  do you see it on the page as text next
> > to a 'FolderOpen" image?  Is that text unique on the screen, or does
> > it appear in other places as well?
>
> > The problem we are faced with here is that there are several
> > overlapping HTML elements here, and none of the HTML types used here
> > are normally 'reactive' on their own to being clicked.  (as opposed to
> > an  type such as a button)   So there is somewhere that we
> > cannot see here, behind the scenes 'plumbing' that sets up some of
> > those elements to be sensitive to specific events, and run specific
> > javscript when the events occur.  I suspect this is configured at a
> > class or style level, but unless you really want to dig around in the
> > controls code that doesn't much matter.  The issue is that of this
> > sort of 'stack' of elements, we don't know which one is responsive to
> > the click.. furthermore we don't know if it's looking for onclick,
> > onmousedown, onmouseup, or whatever.
>
> > What you have going in your favor is you know the ID of the outer
> > container, whcih makes it easier to try and click on it, OR one of the
> > inner ones..
>
> > You've got (periods used to force spacing)
>
> >  > style="font-size: 11px; top: 6px;">
> > . .
> > . . . 
> > . . . . 
> > . . . .  Access
> > . . . 
>
> > What I would do is mess around using IRB to try clicking on each of
> > these in turn using something like what I have below, and see if just
> > a basic click on one of these works.
>
> > browser.div(:id, "configure_access_left").click
> > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > bwrap").click
> > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > body transparent-body-noheader").click
> > browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> > images/FolderOpen.gif").click
>
> > The ones after the first are effectively saying 'look inside the div
> > with the id configure_access_left and find the div with class  and
> > click on it)  notice that you don't need to specify the entire path or
> > nesting as you would with xpath.  All that is needed is enough UNIQUE
> > identifiers (or a combination that is unique) for watir to find the
> > element you want.
>
> > If that doesn't work, then you may have to try firing events such as
> > onmousedown or onmouseup in place of the click.
>
> > The other thing I'd strongly suggest is perhaps contacting the support
> > folks for EXTJS, explain you are trying to automate testing of the
> > site using their controls, and see if they can tell you what event (or
> > sequence of events) needs to be fired at which class of divs in order
> > to effect a 'click'
>
> > On Mar 2, 9:52 pm, vin  wrote:
>
> > > I need to use the first div which as static ID as
> > > "configure_access_left":
>
> > > I have tried below methods but its not working:
> > > b.div(:id, "configure_access_left").click
> > > b.div(:id, "ext-gen236").click
>
> > > Also please let me know if i can make use of Access (marked <<<) to
> > > achieve required click operation?
> > > ###
> > > . > > style="font-size: 11px; top: 6px;">
> > > 
> > > 
> > > 
> > >  Access  <<<
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
>
> > > Thanks,

-- 
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] Application crashes on first execution

2011-03-16 Thread Ashu
Hi,
I am working on a project dealing with automation using WATIR.
I have scripts for testing a Hardware device.
On every first instance of executing the script, a new browser opens
up. (Mozilla Browser 3.6.3)
I hav installed jssh for firefox.(jssh-3.6-WINNT.xpi)
Despite of that I am getting the following error, on first run. ->
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:237:i
n `set_defaults': Unable to connect to machine : 127.0.0.1 on port
9997. Make su
re that JSSh is properly installed and Firefox is running with '-jssh'
option (W
atir::Exception::UnableToStartJSShException)
As my application crashes, thereafter on the next execution the abover
error doesnt appear and my application runs fine.

I am using firewatir (1.6.5)
fxruby (1.6.20 x86-mingw32, 1.2.6 mswin32)
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]

Please help
Thanks!

-- 
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] Application crashes on first execution

2011-03-16 Thread Ashu
Hi,
I am working on a project dealing with automation using WATIR.
I have scripts for testing a Hardware device.
On every first instance of executing the script, a new browser opens
up. (Mozilla Browser 3.6.3)
I hav installed jssh for firefox.(jssh-3.6-WINNT.xpi)
Despite of that I am getting the following error, on first run. ->
C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
firefox.rb:237:in `set_defaults': Unable to connect to machine :
127.0.0.1 on port 9997. Make sure that JSSh is properly installed and
Firefox is running with '-jssh' option
(Watir::Exception::UnableToStartJSShException)
As my application crashes, thereafter on the next execution the abover
error doesnt appear and my application runs fine.

I am using firewatir (1.6.5)
fxruby (1.6.20 x86-mingw32, 1.2.6 mswin32)
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]

Please help
Thanks!

-- 
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] Click on the link in a cell of a table

2011-03-16 Thread Željko Filipin
On Wed, Mar 16, 2011 at 1:01 PM, Aravind  wrote:
> I have a table in the page with few columns like Action, name, status etc.

Show us the HTML code.

Željko
--
watir.com - community manager
watir.com/book- author
viaqa.mobi conference on software testing - organizer
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

-- 
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] viaqa Watir days

2011-03-16 Thread Željko Filipin
Hi,

This mail is sent to viaqa Google group[1], cc wtr-development and
watir-general, and bcc to all members of Watir team[2].

Andreas has recently asked me what is new with Watir conference in Zagreb,
so I have figured out that probably I did not communicate our progress
efficiently.

Bret will be in Europe in the middle of June, and he said he would like us
to have a small Watir conference in Zagreb, Croatia (where I live). Since I
am already one of the organizers of viaqa[3] conference on software testing,
we have decided to add two days to the conference and call it viaqa Watir
days[4]. Dates are June 15th and 16th 2011. (viaqa is on June 14th.)

We have a venue and we are accepting talks[5].

If you are interested in coming, please let me know. I would prefer if
replies are sent to viaqa Google group.

Looking forward to seeing you at Selenium Conference and in Zagreb! :)

Željko
--
[1] http://groups.google.com/group/viaqa
[2] http://watir.com/team/
[3] http://viaqa.mobi/
[4] http://viaqa.mobi/watir-days/
[5] http://viaqa.mobi/talk-proposals/

-- 
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] Click on the link in a cell of a table

2011-03-16 Thread Aravind
Hi

Thanks for the reply.

I got the solution for that.

thanks
aravind



On Wed, Mar 16, 2011 at 7:04 PM, Željko Filipin <
zeljko.fili...@wa-research.ch> wrote:

> On Wed, Mar 16, 2011 at 1:01 PM, Aravind  wrote:
> > I have a table in the page with few columns like Action, name, status
> etc.
>
> Show us the HTML code.
>
> Željko
> --
> watir.com - community manager
> watir.com/book- author
> viaqa.mobi conference on software testing - organizer
> watirpodcast.com - host
> testingpodcast.com - audio podcasts on software testing. all of them
>
> --
> 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


[wtr-general] Re: Click on the link in a cell of a table

2011-03-16 Thread Chuck van der Linden
Care to share it with us so other users can benefit from it?



On Mar 16, 8:17 am, Aravind  wrote:
> Hi
>
> Thanks for the reply.
>
> I got the solution for that.
>
> thanks
> aravind
>
> On Wed, Mar 16, 2011 at 7:04 PM, Željko Filipin <
>
> zeljko.fili...@wa-research.ch> wrote:
> > On Wed, Mar 16, 2011 at 1:01 PM, Aravind  wrote:
> > > I have a table in the page with few columns like Action, name, status
> > etc.
>
> > Show us the HTML code.
>
> > Željko
> > --
> > watir.com - community manager
> > watir.com/book- author
> > viaqa.mobi conference on software testing - organizer
> > watirpodcast.com - host
> > testingpodcast.com - audio podcasts on software testing. all of them
>
> > --
> > 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

-- 
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: click Div button

2011-03-16 Thread Chuck van der Linden
Please start another thread for this new question, as this is really a
separate question of how to measure the response time of something
which is triggered via client-side code responding to an event.

Also, for this particular thing, is it reacting with the site, loading
a new page, or just doing purely client side gymnastics and
reformatting something on the page?

On Mar 16, 6:02 am, vin  wrote:
> Stuck with another issue!!
>
> With ruby interactive i could see the time while accessing the
> browser(which is important in my scripting) but for fireevent the
> value is "nil" as shown:
>
> irb(main):004:0* b = Watir::Browser.new
> => #
> irb(main):005:0>
> irb(main):006:0* b.goto "http://srx-blue";
> => 1.96875 <
> irb(main):007:0> b.div(:id,
> "configure_access_left").fireEvent("onmouseup")
> => nil  <<
>
> Please let me know if any alternative and to update, below methods did
> not help to click the div button except fireEvent("onmouseup").
> browser.div(:id, "configure_access_left").click
> browser.div(:id, "configure_access_left").div(:class, "transparent-
> bwrap").click
> browser.div(:id, "configure_access_left").div(:class, "transparent-
> body transparent-body-noheader").click
> browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> images/FolderOpen.gif").click
>
> On Mar 16, 5:15 pm, vin  wrote:
>
> > Regret for the delay since i was OOO.
>
> > Thanks everyone!! its working with fireevent.
>
> >  ie.div(:id, "configure_access_left").fireEvent("onmouseup")
>
> > Regards,
> > vin
>
> > On Mar 3, 11:14 pm, Chuck van der Linden  wrote:
>
> > > 'access'  appears to be text..  do you see it on the page as text next
> > > to a 'FolderOpen" image?  Is that text unique on the screen, or does
> > > it appear in other places as well?
>
> > > The problem we are faced with here is that there are several
> > > overlapping HTML elements here, and none of the HTML types used here
> > > are normally 'reactive' on their own to being clicked.  (as opposed to
> > > an  type such as a button)   So there is somewhere that we
> > > cannot see here, behind the scenes 'plumbing' that sets up some of
> > > those elements to be sensitive to specific events, and run specific
> > > javscript when the events occur.  I suspect this is configured at a
> > > class or style level, but unless you really want to dig around in the
> > > controls code that doesn't much matter.  The issue is that of this
> > > sort of 'stack' of elements, we don't know which one is responsive to
> > > the click.. furthermore we don't know if it's looking for onclick,
> > > onmousedown, onmouseup, or whatever.
>
> > > What you have going in your favor is you know the ID of the outer
> > > container, whcih makes it easier to try and click on it, OR one of the
> > > inner ones..
>
> > > You've got (periods used to force spacing)
>
> > >  > > style="font-size: 11px; top: 6px;">
> > > . .
> > > . . . 
> > > . . . . 
> > > . . . .  Access
> > > . . . 
>
> > > What I would do is mess around using IRB to try clicking on each of
> > > these in turn using something like what I have below, and see if just
> > > a basic click on one of these works.
>
> > > browser.div(:id, "configure_access_left").click
> > > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > > bwrap").click
> > > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > > body transparent-body-noheader").click
> > > browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> > > images/FolderOpen.gif").click
>
> > > The ones after the first are effectively saying 'look inside the div
> > > with the id configure_access_left and find the div with class  and
> > > click on it)  notice that you don't need to specify the entire path or
> > > nesting as you would with xpath.  All that is needed is enough UNIQUE
> > > identifiers (or a combination that is unique) for watir to find the
> > > element you want.
>
> > > If that doesn't work, then you may have to try firing events such as
> > > onmousedown or onmouseup in place of the click.
>
> > > The other thing I'd strongly suggest is perhaps contacting the support
> > > folks for EXTJS, explain you are trying to automate testing of the
> > > site using their controls, and see if they can tell you what event (or
> > > sequence of events) needs to be fired at which class of divs in order
> > > to effect a 'click'
>
> > > On Mar 2, 9:52 pm, vin  wrote:
>
> > > > I need to use the first div which as static ID as
> > > > "configure_access_left":
>
> > > > I have tried below methods but its not working:
> > > > b.div(:id, "configure_access_left").click
> > > > b.div(:id, "ext-gen236").click
>
> > > > Also please let me know if i can make use of Access (marked <<<) to
> > > > achieve required click operation?
> > > > ###
> > > > . > > > style="font-size: 11px; top: 6px;">
> > > > 
> > > > 
> > > > 
> > > >  Access  <<<
> > > > 
> > > > 
> > > > 
> > > > 
> >

[wtr-general] Re: Recent Stack Overflow Questions Tagged Watir

2011-03-16 Thread Chuck van der Linden


On Mar 16, 3:55 am, Željko Filipin 
wrote:
> http://stackoverflow.com/questions/5317433/ruby-stops-after-first-loop

DO NOT assist this guy.

 a) what he's trying to do specifically violates the terms of service
for the site he linked in his code. (cramster)
 b) what he's doing in the code (printing every question and answer)
is very obviously IP theft
 c) it's a brand new stack-overflow user, generic name, never asked a
question, no reputation.. so there's no way to tell if he actually has
a legitimate interest in trying to 'test' the site

-- 
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: Recent Stack Overflow Questions Tagged Watir

2011-03-16 Thread Željko Filipin
On Wed, Mar 16, 2011 at 6:25 PM, Chuck van der Linden 
wrote:
>  a) what he's trying to do specifically violates the terms of service
> for the site he linked in his code. (cramster)

Thanks for letting us know.

Željko
--
watir.com - community manager
watir.com/book - author
viaqa.mobi conference on software testing - organizer
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them

-- 
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: Click on the link in a cell of a table

2011-03-16 Thread Dave McNulla
Be a giver and a getter. If you can't be both, be a giver.

Dave

-- 
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: click Div button

2011-03-16 Thread Chuck van der Linden
Please start new threads for new issues, don't append them on the end
of existing threads that are dealing with a different problem

On Mar 16, 6:02 am, vin  wrote:
> Stuck with another issue!!
>
> With ruby interactive i could see the time while accessing the
> browser(which is important in my scripting) but for fireevent the
> value is "nil" as shown:
>
> irb(main):004:0* b = Watir::Browser.new
> => #
> irb(main):005:0>
> irb(main):006:0* b.goto "http://srx-blue";
> => 1.96875 <
> irb(main):007:0> b.div(:id,
> "configure_access_left").fireEvent("onmouseup")
> => nil  <<
>
> Please let me know if any alternative and to update, below methods did
> not help to click the div button except fireEvent("onmouseup").
> browser.div(:id, "configure_access_left").click
> browser.div(:id, "configure_access_left").div(:class, "transparent-
> bwrap").click
> browser.div(:id, "configure_access_left").div(:class, "transparent-
> body transparent-body-noheader").click
> browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> images/FolderOpen.gif").click
>
> On Mar 16, 5:15 pm, vin  wrote:
>
> > Regret for the delay since i was OOO.
>
> > Thanks everyone!! its working with fireevent.
>
> >  ie.div(:id, "configure_access_left").fireEvent("onmouseup")
>
> > Regards,
> > vin
>
> > On Mar 3, 11:14 pm, Chuck van der Linden  wrote:
>
> > > 'access'  appears to be text..  do you see it on the page as text next
> > > to a 'FolderOpen" image?  Is that text unique on the screen, or does
> > > it appear in other places as well?
>
> > > The problem we are faced with here is that there are several
> > > overlapping HTML elements here, and none of the HTML types used here
> > > are normally 'reactive' on their own to being clicked.  (as opposed to
> > > an  type such as a button)   So there is somewhere that we
> > > cannot see here, behind the scenes 'plumbing' that sets up some of
> > > those elements to be sensitive to specific events, and run specific
> > > javscript when the events occur.  I suspect this is configured at a
> > > class or style level, but unless you really want to dig around in the
> > > controls code that doesn't much matter.  The issue is that of this
> > > sort of 'stack' of elements, we don't know which one is responsive to
> > > the click.. furthermore we don't know if it's looking for onclick,
> > > onmousedown, onmouseup, or whatever.
>
> > > What you have going in your favor is you know the ID of the outer
> > > container, whcih makes it easier to try and click on it, OR one of the
> > > inner ones..
>
> > > You've got (periods used to force spacing)
>
> > >  > > style="font-size: 11px; top: 6px;">
> > > . .
> > > . . . 
> > > . . . . 
> > > . . . .  Access
> > > . . . 
>
> > > What I would do is mess around using IRB to try clicking on each of
> > > these in turn using something like what I have below, and see if just
> > > a basic click on one of these works.
>
> > > browser.div(:id, "configure_access_left").click
> > > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > > bwrap").click
> > > browser.div(:id, "configure_access_left").div(:class, "transparent-
> > > body transparent-body-noheader").click
> > > browser.div(:id, "configure_access_left").img(:src, "/gui-framework/
> > > images/FolderOpen.gif").click
>
> > > The ones after the first are effectively saying 'look inside the div
> > > with the id configure_access_left and find the div with class  and
> > > click on it)  notice that you don't need to specify the entire path or
> > > nesting as you would with xpath.  All that is needed is enough UNIQUE
> > > identifiers (or a combination that is unique) for watir to find the
> > > element you want.
>
> > > If that doesn't work, then you may have to try firing events such as
> > > onmousedown or onmouseup in place of the click.
>
> > > The other thing I'd strongly suggest is perhaps contacting the support
> > > folks for EXTJS, explain you are trying to automate testing of the
> > > site using their controls, and see if they can tell you what event (or
> > > sequence of events) needs to be fired at which class of divs in order
> > > to effect a 'click'
>
> > > On Mar 2, 9:52 pm, vin  wrote:
>
> > > > I need to use the first div which as static ID as
> > > > "configure_access_left":
>
> > > > I have tried below methods but its not working:
> > > > b.div(:id, "configure_access_left").click
> > > > b.div(:id, "ext-gen236").click
>
> > > > Also please let me know if i can make use of Access (marked <<<) to
> > > > achieve required click operation?
> > > > ###
> > > > . > > > style="font-size: 11px; top: 6px;">
> > > > 
> > > > 
> > > > 
> > > >  Access  <<<
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
>
> > > > Thanks,

-- 
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...@

[wtr-general] Re: Application crashes on first execution

2011-03-16 Thread Dave McNulla
I always open Firefox with the -jssh parameter before I run the script
e.g. firefox -jssh

Dave

-- 
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] Measure response time with fireEvent("onmouseup")

2011-03-16 Thread vin
Hi,

I am using fireevent to click a div (button to navigate to a page) as
shown:
(ie.div(:id, "configure_access_left").fireEvent("onmouseup")
###
irb(main):004:0* b = Watir::Browser.new
=> #
irb(main):005:0>
irb(main):006:0* b.goto "http://abc-blue";
=> 1.96875 <<< b.div(:id,
"configure_access_left").fireEvent("onmouseup")
=>
nil
<<< shows as nill
irb(main):008:0>

By using above method, navigate to a required page is achieved but the
response shows as "nil" instead of the time. The scenario is server-
client and upon navigation to a page client will fetch the data from
the server. Here is the snippet captured with firebug:

POST http://abc-blue/jsdm/ajax/access.php 200 OK 571ms
sajax(line 150)
ParamsHeadersPostPutResponseCacheHTMLXML
Response Headersview source
DateThu, 17 Mar 2011 04:57:44 GMT
Server  Mbedthis-Appweb/2.4.0
Cache-Control   no-store, no-cache, must-revalidate, post-check=0, pre-
check=0
Content-Typetext/xml; charset=UTF-8
Etag"1368cc-296f-503300"
Content-Length  35
Connection  keep-alive
Keep-Alive  timeout=60, max=95
X-Powered-ByPHP/5.3.2
Expires Thu, 19 Nov 1981 08:52:00 GMT
Pragma  no-cache
Request Headersview source
Hostsrx-blue
User-Agent  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  115
Connection  keep-alive
Method  POST /jsdm/ajax/access.php HTTP/1.1
Content-Typeapplication/x-www-form-urlencoded; charset=UTF-8
Referer http://abc-blue/login


Please let me know if i can achieve it from any other method.

Thanks,
Vin

-- 
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