I just started 'playing' with Watir so I am really newbie.
I started from automating Gmail (http://wiki.openqa.org/display/WTR/
Automating+Gmail+with+Watir?&#comments). It looks that this script is
based on old Gmail html layout.
Canvas_frame.button(:text, 'Send').click # Send the message .
Above command is not relevant anymore : now in Gmail 'Send' feature is
not <button> but <div> tag
Below xpath for 'Send' inside Canvas_frame:
/html/body/div[1]/div[2]/div/div[2]/div[1]/div[3]/div[1]/div/div/
div[2]/div/div/div/div/div[2]/div/div[2]/div/div/div/div[1]/div[@id=':
9c']/div/div/div[@id=':88']/div[@id=':85']/div/div/div/div[2]/b
and complete HTML inside Canvas_frame :
<HTML class="cQ" closure_hashCode_8441od="543"><BODY class="cP"
closure_hashCode_8441od="34"><DIV style="POSITION: relative"
closure_hashCode_8441od="544"><DIV class="nH" style="WIDTH: 1660px"
closure_hashCode_8441od="545"><DIV class="nH" style="POSITION:
relative" closure_hashCode_8441od="158"><DIV class="nH"
closure_hashCode_8441od="546"><DIV class="no"
closure_hashCode_8441od="547"><DIV class="nH nn" style="WIDTH: 1431px"
closure_hashCode_8441od="548"><DIV class="nH"
closure_hashCode_8441od="549"><DIV class="nH q0CeU x"
closure_hashCode_8441od="550"><DIV class="nH"
closure_hashCode_8441od="551"><DIV class="l m"
closure_hashCode_8441od="552"><DIV class="l n" style="MARGIN-LEFT:
4px" closure_hashCode_8441od="553"><DIV class="k" style="PADDING-
RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 4px
0px 0px; PADDING-TOP: 0px" closure_hashCode_8441od="554"><DIV
class="diLZtc" closure_hashCode_8441od="555"><DIV class="nH"
closure_hashCode_8441od="556"><DIV class="nH"
closure_hashCode_8441od="557"><DIV class="nH"
closure_hashCode_8441od="558"><DIV class="nH"
closure_hashCode_8441od="1526"><DIV class="nH"
closure_hashCode_8441od="1527"><DIV class="nH"
closure_hashCode_8441od="1528"><DIV
closure_hashCode_8441od="1434"><DIV class=""
closure_hashCode_8441od="1529"><DIV id=":5f"
closure_hashCode_8441od="1571"><DIV class="eh"
closure_hashCode_8441od="1572"><DIV class="dW"
closure_hashCode_8441od="1573" role="navigation"><DIV class="dX J-Jw"
id=":3p" hideFocus closure_hashCode_8441od="1443"
unselectable="on"><DIV class="J-K-I J-J5-Ji Bq L3" id=":3s"
closure_hashCode_8441od="1436" act="" unselectable="on"><DIV class="J-
J5-Ji J-K-I-Kv-H" unselectable="on"><DIV class="J-J5-Ji J-K-I-J6-H"
unselectable="on"><DIV class="J-K-I-KC" unselectable="on"><DIV
class="J-K-I-Jz" unselectable="on"><B unselectable="on"> Send </B></
DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></
DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></
DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>
I have tried following without success:
1. Click <b> tag using "element_by_xpath"
canvas_frame.element_by_xpath("/html/body/div[1]/div[2]/div/div[2]/
div[1]/div[3]/div[1]/div/div/div[2]/div/div/div/div/div[2]/div/div[2]/
div/div/div/div[1]/div[@id=':9c']/div/div/div[@id=':88']/div[@id=':
85']/div/div/div/div[2]/b").click
- element_by_xpath is not supported inside frame (NoMethodError:
undefined method `element_by_xpath' for #<Watir::Frame:0x33c2ec4>)
2. I have added Watir::B class to non_control_elements.rb and then
tried :
canvas_frame.B(:text,"Send").click
Watir works fine, however no action on page - mail is not sent
3. I was trying to click parent div(s) as follows
canvas_frame.div(:class,"J-K-I-Jz").click
canvas_frame.div(:class,"J-K-I-KC").click
canvas_frame.div(:class,"J-J5-Ji J-K-I-J6-H").click
canvas_frame.div(:class,"J-K-I J-J5-Ji Bq L3").click
Watir works fine, however no action on page - mail is not sent
Does anyone has an idea how to get to this <div> or <b> and click
'Send' using watir ?
I have went through this pages already.
I understand your concept, and probably I will need to try some easier
web or switch to basic, however back to my question is this possible
to click this div using watir ?
I would not start from gmail, however this script looked very
appealing and it is not working on "fatview" gmail
thanks
Alek
On 23 Lut, 11:21, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
> On Tue, Feb 23, 2010 at 10:17 AM, Alek <aleksander.lip...@gmail.com> wrote:
> > I just started 'playing' with Watir so I am really newbie.
> > I started from automating Gmail
>
> Please do not use Gmail to learn how to use Watir. Gmail is full of strange
> things. If you really want to use Gmail, then switch to basic html view
> until you are familiar with Watir.
>
> I would suggest that you read this:
>
> http://wiki.openqa.org/display/WTR/Quick+Starthttp://wiki.openqa.org/display/WTR/Tutorial
--
You received this message because you are subscribed to the Google Groups "Watir General" group.
To post to this group, send email to watir-...@googlegroups.com
Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to watir-genera...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/watir-general
1. Aware newbies to not start watir automation with Gmail , since it's
html is too complicated ;) and put this is on wiki.
2. Is this possible to click using waitr nested "unselectable" div on
Gmail ? (<DIV
class="J-K-I-Jz" unselectable="on"><B unselectable="on"> Send </B></
DIV>)
thanks for all replies,
Alek
> > On Tue, Feb 23, 2010 at 2:30 AM, Alek <aleksander.lip...@gmail.com> wrote:
>
> >> Thanks Željko
>
> >> I have went through this pages already.
>
> >> I understand your concept, and probably I will need to try some easier
> >> web or switch to basic, however back to my question is this possible
> >> to click this div using watir ?
>
> >> I would not start from gmail, however this script looked very
> >> appealing and it is not working on "fatview" gmail
>
> >> thanks
> >> Alek
>
> >> On 23 Lut, 11:21, Željko Filipin <zeljko.fili...@wa-research.ch>
> >> wrote:
> >> > On Tue, Feb 23, 2010 at 10:17 AM, Alek <aleksander.lip...@gmail.com>
> >> wrote:
> >> > > I just started 'playing' with Watir so I am really newbie.
> >> > > I started from automating Gmail
>
> >> > Please do not use Gmail to learn how to use Watir. Gmail is full of
> >> strange
> >> > things. If you really want to use Gmail, then switch to basic html view
> >> > until you are familiar with Watir.
>
> >> > I would suggest that you read this:
>
> >>http://wiki.openqa.org/display/WTR/Quick+Starthttp://wiki.openqa.org/...
>
> >> > Željko
> >> > --
> >> > watir.com - community manager
> >> > pledgie.com/campaigns/2982 - donate to Watir
> >> > watirpodcast.com - host
> >> > testingpodcast.com - podcasts on software testing. all of them
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Watir General" group.
> >> To post to this group, send email to watir-...@googlegroups.com
> >> Before posting, please read the following guidelines:
> >>http://wiki.openqa.org/display/WTR/Support
> >> To unsubscribe from this group, send email to
> >> watir-genera...@googlegroups.com<watir-general%2Bunsubscribe@goog legroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/watir-general
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Watir General" group.
> > To post to this group, send email to watir-...@googlegroups.com
> > Before posting, please read the following guidelines:
> >http://wiki.openqa.org/display/WTR/Support
> > To unsubscribe from this group, send email to
> > watir-genera...@googlegroups.com<watir-general%2Bunsubscribe@goog legroups.com>
On Feb 24, 7:56 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
On Feb 26, 9:01 am, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
> Google engineers might be using Watir to test their upcoming Gmail Labs
> apps!
>
> j/k :)
>
> FK
>
> On Thu, Feb 25, 2010 at 7:42 PM, Alister Scott <alister.sc...@gmail.com>wrote:
>
> > It makes sense to get rid of the Gmail example, because why you would
> > ever want to automated a GUI to send an email is the question.
> > It is *so* easy to send an email through ruby itself.
>
> > On Feb 24, 7:56 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
> > wrote:
> > > On Tue, Feb 23, 2010 at 9:12 PM, Bill Agee <billa...@gmail.com> wrote:
> > > > I suggest we remove the gmail wiki page.
>
> > > Done.
>
> > > Željko
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Watir General" group.
> > To post to this group, send email to watir-...@googlegroups.com
> > Before posting, please read the following guidelines:
> >http://wiki.openqa.org/display/WTR/Support
> > To unsubscribe from this group, send email to
> > watir-genera...@googlegroups.com<watir-general%2Bunsu...@googlegroups.com>