Hi

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]/d...@id=':
9c']/div/div/d...@id=':88']/d...@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]/d...@id=':9c']/div/div/d...@id=':88']/d...@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 ?



-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@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-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to