[wtr-general] Re: veri complex think : how to access table body elements; how to click on a row

2011-05-25 Thread Chuck van der Linden
If you are trying to iterate through the rows, try this

  $ie.table(:id, "myGrid").rows.each do | row |

for the cells try

row.cells.each do | cell |

as far as clicking on rows outside the checkboxes or links, I see
nothing that would make the 'row' sensitive to clicking.  However
there is an 'onclick' event defined for the entire table..  so you
might try clicking on that, or using fireEvent to fire the onclick
event against the table element.   The thing is that the html you
pasted into the message is for a table with the ID of  "macsearchres"
which doesn't match the table ID in the Watir code you provided is for
a table with ID 'myGrid' ?  potentially that could also be a part of
your issue

On May 24, 9:55 am, a b  wrote:
> Hi all,
>
> do you know if we have table body support for Firefox on watir?
> I  try to use that sample
> "
>
> $ie.table(:id, "myGrid").body(:index, 1).each do | row |
>   row.each do | cell |
>     ## todo: figure out if this contains a sort link
>     ## todo: click the link now, or save a reference for later?
>   end
> end
>
> "
>
> but on firefox nothing happen.
>
> I am into a complex scenario. I have an dynamic table body generated.
> First cell is all the time a check box, when i enable it i can delete that
> row.
> When I click anywhere else on the row a new frame is opened.
>
> Here is page code; also I've attached the file
>
> 
>    onclick="mac.searchjump(event,"bulletin")"
> fields="checkbox:delete,date:mtime,name,sticky,last" id="macsearchres"
> class="mactable1">
>     
>       
>         
>               id="select_all" func="select_all" class="nojump macobsv" name="select_all">
>         
>          help="1">Date
>          help="1">[bulletin]
>          help="1">Sticky
>         Last
> posted
>     
>     
>         
>              class="nojump">
>         
>         Friday, May 13, 2011 10:38:19 AM
>         a
>         T
>         
>         
>     
>         
>            class="nojump">
>         Thursday, May 19, 2011 10:21:38 AM
>         1305814892
>         T
>         
>     
>         
>              class="nojump">
>             Thursday, May 19, 2011 10:21:52
> AMrT class="machover"> value="1305210159" name="delete" class="nojump">Thursday, May 12,
> 2011 10:24:01 AM1305210159F rowid="5" target="1305214000" class="machover"> type="checkbox" r="1" value="1305214000" name="delete"
> class="nojump">Thursday, May 12, 2011 11:26:46
> AM1305214000F target="1305221746" class="machover"> type="checkbox" r="1" value="1305221746" name="delete"
> class="nojump">Thursday, May 12, 2011 1:35:52
> PM1305221746F target="1305297438" class="machover"> type="checkbox" r="1" value="1305297438" name="delete"
> class="nojump">Friday, May 13, 2011 10:37:29
> AM1305297438F
> 
>
> Million thanks in advance.
>
> Cristina
>
>  html.txt
> 3KViewDownload

-- 
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: Somewhat philosophical question about persistence of Watir's page object variables...

2011-05-25 Thread Chuck van der Linden
in the first case your variable is being set to reference an specific
object within the browser object, once you change the page the
contents of the browser object change and the one you were
referencing  no longer exists.   In the second case you are setting it
to a specific value, not a reference to an object, so changing the
page has no effect on the value.

On May 24, 7:05 am, Abe Heward  wrote:
> So, I navigate to a page on my test site and define a bunch of variables as
> page objects, like so:
>
> site_name = browser.text_field(:id, "sitename")
> site_url = browser.text_field(:id, "url")
> etc. ...
>
> I then navigate to a new page with a browser.goto. On the new page I define
> some additional variables, like so:
>
> campaign_name = browser.text_field(:id, "campname")
> etc. ...
>
> However, if I now want to get a site_name.value it turns out that it's
> empty.
>
> In some sense I can understand why this is the case, but in others I can't.
>
> Can someone explain the thinking behind the decision that led to Watir being
> built this way?
>
> I can easily switch my variable definitions to look like this:
>
> site_name = browser.text_field(:id, "sitename").value
>
> ... but that seems to rob me of a lot of the flexibility (and code
> readability) that Watir has to offer.

-- 
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] how to minimize "Aw snap" errors in Chrome???

2011-05-25 Thread Ashok Tulachan
Hello everyone,

While automating the web apps, i am getting too many & consistent "Aw snap"
google chrome errors while i don't get those error while running from other
tools such as "SAHI" or "QTP". I was wondering if we have any solution
to minimize the "Aw snap" errors.

Also, i also wanted to increase the speed of google chrome as it is awfully
slow in entering the data. Do we have any other methods for chrome like we
have for IE?

*IE speed up execution command*
**
*Browser.speed = :fast*

Regards,

Ashok Tulachan

-- 
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: Interaction with "Resend" confirmation dialog box using Watir-Webdriver

2011-05-25 Thread the_zonker
http://userscripts.org/topics/20160

On May 25, 4:36 pm, the_zonker  wrote:
> Here is discussionabout this pop-up  on Firefox forums.
>
> On May 25, 4:25 pm, the_zonker  wrote:
>
>
>
>
>
>
>
> > No, I think this pop up comes from browser not from page content.
>
> > On May 25, 2:50 pm, Jari Bakken  wrote:
>
> > > On Wed, May 25, 2011 at 12:20 PM, the_zonker  
> > > wrote:
> > > > Hi guys,
>
> > > > First of all my environment:
> > > > watir-webdriver 0.2.3
>
> > > > A Web application I testing has parameters which are sent to server
> > > > during page load.
> > > > It causes "Retry" confirmation dialog in IE and "Resend"in FF when I
> > > > refresh any page of the application.
>
> > > > Is there any way to handle this pop up which is stopping my scripts?
>
> > > > I tried to send "Enter" key directly to Watir::Browser instance but it
> > > > didn't help.
> > > > All webdriver actions are stopped after appearing of them.
>
> > > > It seems that this modal dialog is on the Browser's top level and
> > > > Webdriver cannot handle it.
> > > > But I hope that there is way to workaround it.
>
> > > > Please, help.
> > > > I appreciate any effort.
>
> > > > Regards, Vadim
>
> > > Are these JavaScript alerts (i.e. using the
> > > window.{alert,confirm,prompt} functions)? If so you can work around it
> > > by using the alerts extension:
>
> > >  https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdri...
>
> > > 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: Interaction with "Resend" confirmation dialog box using Watir-Webdriver

2011-05-25 Thread the_zonker
Here is discussionabout this pop-up  on Firefox forums.

On May 25, 4:25 pm, the_zonker  wrote:
> No, I think this pop up comes from browser not from page content.
>
> On May 25, 2:50 pm, Jari Bakken  wrote:
>
>
>
>
>
>
>
> > On Wed, May 25, 2011 at 12:20 PM, the_zonker  wrote:
> > > Hi guys,
>
> > > First of all my environment:
> > > watir-webdriver 0.2.3
>
> > > A Web application I testing has parameters which are sent to server
> > > during page load.
> > > It causes "Retry" confirmation dialog in IE and "Resend"in FF when I
> > > refresh any page of the application.
>
> > > Is there any way to handle this pop up which is stopping my scripts?
>
> > > I tried to send "Enter" key directly to Watir::Browser instance but it
> > > didn't help.
> > > All webdriver actions are stopped after appearing of them.
>
> > > It seems that this modal dialog is on the Browser's top level and
> > > Webdriver cannot handle it.
> > > But I hope that there is way to workaround it.
>
> > > Please, help.
> > > I appreciate any effort.
>
> > > Regards, Vadim
>
> > Are these JavaScript alerts (i.e. using the
> > window.{alert,confirm,prompt} functions)? If so you can work around it
> > by using the alerts extension:
>
> >  https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdri...
>
> > 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: Interaction with "Resend" confirmation dialog box using Watir-Webdriver

2011-05-25 Thread the_zonker
No, I think this pop up comes from browser not from page content.

On May 25, 2:50 pm, Jari Bakken  wrote:
> On Wed, May 25, 2011 at 12:20 PM, the_zonker  wrote:
> > Hi guys,
>
> > First of all my environment:
> > watir-webdriver 0.2.3
>
> > A Web application I testing has parameters which are sent to server
> > during page load.
> > It causes "Retry" confirmation dialog in IE and "Resend"in FF when I
> > refresh any page of the application.
>
> > Is there any way to handle this pop up which is stopping my scripts?
>
> > I tried to send "Enter" key directly to Watir::Browser instance but it
> > didn't help.
> > All webdriver actions are stopped after appearing of them.
>
> > It seems that this modal dialog is on the Browser's top level and
> > Webdriver cannot handle it.
> > But I hope that there is way to workaround it.
>
> > Please, help.
> > I appreciate any effort.
>
> > Regards, Vadim
>
> Are these JavaScript alerts (i.e. using the
> window.{alert,confirm,prompt} functions)? If so you can work around it
> by using the alerts extension:
>
>  https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdri...
>
> 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


Re: [wtr-general] Interaction with "Resend" confirmation dialog box using Watir-Webdriver

2011-05-25 Thread Jari Bakken
On Wed, May 25, 2011 at 12:20 PM, the_zonker  wrote:
> Hi guys,
>
> First of all my environment:
> watir-webdriver 0.2.3
>
> A Web application I testing has parameters which are sent to server
> during page load.
> It causes "Retry" confirmation dialog in IE and "Resend"in FF when I
> refresh any page of the application.
>
> Is there any way to handle this pop up which is stopping my scripts?
>
> I tried to send "Enter" key directly to Watir::Browser instance but it
> didn't help.
> All webdriver actions are stopped after appearing of them.
>
> It seems that this modal dialog is on the Browser's top level and
> Webdriver cannot handle it.
> But I hope that there is way to workaround it.
>
> Please, help.
> I appreciate any effort.
>
> Regards, Vadim
>

Are these JavaScript alerts (i.e. using the
window.{alert,confirm,prompt} functions)? If so you can work around it
by using the alerts extension:

  
https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/extensions/alerts.rb

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] Interaction with "Resend" confirmation dialog box using Watir-Webdriver

2011-05-25 Thread the_zonker
Hi guys,

First of all my environment:
watir-webdriver 0.2.3

A Web application I testing has parameters which are sent to server
during page load.
It causes "Retry" confirmation dialog in IE and "Resend"in FF when I
refresh any page of the application.

Is there any way to handle this pop up which is stopping my scripts?

I tried to send "Enter" key directly to Watir::Browser instance but it
didn't help.
All webdriver actions are stopped after appearing of them.

It seems that this modal dialog is on the Browser's top level and
Webdriver cannot handle it.
But I hope that there is way to workaround it.

Please, help.
I appreciate any effort.

Regards, Vadim

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