Unsure if this is related, but a bug in the current version of Watir,
1.6.5, prevents some xpaths from being properly parsed. You can fix
this
by changing line 910 of ie-class.rb (C:\Ruby\lib\ruby\gems\1.8\gems
\watir-1.6.5\lib\watir\ie-class.rb):
Before: doc.search(xpath).each do |element|
Af
I am having difficulty using click_no_wait to open a second modal
window that is a child of the first modal window.
click_no_wait does not open the modal window, click works to open the
second modal window but then when the window is open, I am unable to
interact with it.
Ruby Version :
ruby 1.8.
Felipe,
To test the :index locator, I created this simple file:
What happens if you try this:
require "rubygems"
require "watir"
@browser = FireWatir::Firefox.new
@browser.goto "file:///c:/teste.html"
i = 1
1.upto(@browser.text_fields.size) do
@browser.text_field(:index, i).set
Hi George,
It's not a site developed by my team. Our role is to apply the
automation test on it. I have no way to change anything on it. To use
the index attribute on HTML source. And access it using the :index.
But I've tried this anyway, using the :index hoping it will bind the
tabindex. But, i
Hello,
That's weird. I noticed you're using Firefox, so I tested it under FF and it
worked as well:
require "rubygems"
require "watir"
@browser = FireWatir::Firefox.new
@browser.goto "file:///c:/teste.html"
@browser.text_field(:xpath, "//*...@tabindex='4901']").set "teste"
puts @browser.text_
Hi there,
I'm not sure how many text fields are on the page, but have you
considered using the :index attribute?
@ie.text_field(:index, 5).set "something"
On May 6, 12:07 pm, Felipe Pedrini wrote:
> Hello, FK,
>
> Yes, it was I thought, a bug, but I came ask here just to confirm.
>
> I've trie
Hello, FK,
Yes, it was I thought, a bug, but I came ask here just to confirm.
I've tried the workaround, and I have no success. The error continues:
D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/
element.rb:907:in `assert_exists': Unable to locate element,
using :xpath, "//*...@ta
Hello, Felipe,
It sure does look like a bug.
A workaround would be using the wildcard selector like this:
@ie.text_field(:xpath, "//*...@tabindex='4901']").set "test"
Hopefully your tabindex property is unique to all elements :)
Regards,
FK
On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini wrot
Hi guys,
I'm evaluating Watir, and I'm trying to simple get an element using
its XPath. But I'm having a problem.
First look at the problem.
I have the following element in my page:
Notice that it doesn't have name neither id attributes. When I try to
get it using xpath:
browser.text_field(:
Željko's solution is probably your best option. :)
You can also access any of those three cells using XPath - here is a way
that should work in IE and Firefox:
browser.cell(:xpath, "//td[.='Three']")
The dot being compared to 'Three' represents the text of the cell.
And if the cell text has lea
Thanks to you both. Željko's code worked fine but I'll keep in mind
your approach Adam.
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
You received this message because you are subscribed to
http://groups.google.com/group/watir-general
To pos
I popped the OP's code into a simple html page and Željko's approach
worked great. If the content in the third element might change (and
not literally say something as friendly as "Three"), here's a more
robust approach:
MyCells = Array.new
browser.cells.each do |cell| # If looking for
I popped the OP's code into a simple html page and Željko's approach
worked great. If the content in the third element might change (and
not literally say something as friendly as "Three"), here's a more
robust approach:
MyCells = Array.new
browser.cells.each do |cell| # If looking for
On Thu, May 6, 2010 at 4:58 PM, tjp wrote:
> One
> Two
> Three
> How do I refer to the third one?
Not tested, but should work:
browser.cell(:text => "Three")
or
browser.cell(:id => "zippy", :text => "Three")
Željko
--
watir.com - community manager
pledgie.com/campaigns/2982 - donate to Watir
First off, apologies if I'm in the wrong group. Although I think I'm
in the right place. I have the following html
One
Two
Three
.//*...@id='zippy']/@class is what xPath gives me for every one of
those. How do I refer to the third one? I tried using
ff.contains_text("One") and it gave me an index
On Mon, May 3, 2010 at 8:34 PM, George wrote:
> I am interested in helping, although I'm still a little unclear about
> what I need to do.
George (and everybody else interested in helping),
For now, all you have to do is:
1) Read http://meta.stackexchange.com/questions/6056/proposal-for-watir-s
On Tue, May 4, 2010 at 8:28 AM, Betsy wrote:
> Got confused with how to create new proposal.. :(
Betsy,
Thanks a lot for your effort. I think you have copied Selenium proposal a
bit too much. :)
I will create the proposal and post a link here, so people could vote on it.
Željko
--
Before pos
On Tue, May 4, 2010 at 6:48 AM, Kunal wrote:
> Question - Are we targeting to move to stackexchange based community
> and hence leaving Google group?
Yes. That is my personal goal. I am not sure what other people think. I
think Stack Overflow software is the best solution for Watir support.
Goog
If you like the Watir project, you can make a donation. There is donate
button at http://watir.com/.
We have raised $570 this year. We will spend it on hosting and stuff like
that. We will not spend it on beer, no matter how much I would like that. :)
You can see list of donors and Bret's thank y
But why cannot you get click_no_wait working?
I've made a little blog post about debugging the problems with
click_no_wait. Maybe you can give it a try to see some specific
reasons.
http://www.itreallymatters.net/post/378669758/debugging-watirs-click-no-wait-method-problems
Also, there is a patc
20 matches
Mail list logo