[wtr-general] Re: Help clicking on an image that activates Javascript...

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 08:07, catepillar wrote: > So I really dont know where to begin You can start there: http://wiki.openqa.org/display/WTR/Quick+Start http://wiki.openqa.org/display/WTR/Tutorial > > http://knockout.mappdev.com/img/loots/coin.gif"/> > Try one of these: browser.span(:cla

[wtr-general] how to select from a Dojo Select Widget

2009-04-24 Thread pallavi shashidhar
Hi there, I have a Dojo select widget with the HTML like; and when i type in something (say letter "T"), i should be able to select from the list that appears like this T MATHI T BABU If i have to select the first or the second option, How should i be doing it in watir? I have tried firin

[wtr-general] Re: jssh error - Watir::Exception::UnableToStartJSShException

2009-04-24 Thread emz452
Thanks for the suggestions faejon, I'll try these things and let you know how I go (long weekend where I am, so Tuesday will be the next working day for me!) Angrez - Yep, I have sudo/admin rights and can start firefox with sudo. On Apr 24, 4:08 pm, Angrez Singh wrote: > I think jssh is not ins

[wtr-general] Re: trying to access text_field, but getting link instead?!

2009-04-24 Thread Jarmo Pertman
Okay, back to the original problem. I code similar to this: if $browser.text_field(:id, "blah").exists? do something with text field elsif $browser.select_list(:id, "blah").exists? do something with select list else raise "blah not found" end this code is in a method and it will be call

[wtr-general] I am facing weird issue

2009-04-24 Thread Prince3105
Hi all, See below the structure of my script . require 'watir/ie' require 'watir/testcase' require 'watir/cookiemanager' require 'watir\contrib\enabled_popup' require 'watir/winClicker' require 'time' require 'win32/clipboard' include Win32 $sys_date = Time.now.strftime("%d-%b-%Y")

[wtr-general] Re: I am facing weird issue

2009-04-24 Thread Prince3105
Sorry, by mistakenly i pressed the send button. i describe again require 'watir/ie' require 'watir/testcase' require 'watir/cookiemanager' require 'watir\contrib\enabled_popup' require 'watir/winClicker' require 'time' require 'win32/clipboard' include Win32 $sys_date = Time.now.strftim

[wtr-general] Unable to click on Tabs

2009-04-24 Thread Vishal
My application has 5 tabs. It is initially focused on one tab, i am unable to access the other Tabs. Below is the IE Development bar Details http://levi- carylab02.managementdynamics.com/bp/wo/a5893d0d-6c1d-4b0b- b759-09d71f80abf2/2.page. 1.Results148.3.layout1.selectAllCheckboxImage1x0x0x0x15x

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 12:32, Vishal wrote: > Please let me know how to click on these tabs What have you tried so far? Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir Gen

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Vishal
I tried i) $ie.span(:text ,"Documents").span(:index,1).fire_event('onMouseDown') The control is focusing on The tab but its not clicking. On Apr 24, 3:36 pm, Željko Filipin wrote: > On Fri, Apr 24, 2009 at 12:32, Vishal wrote: > > Please let me know how to click on these tabs > > What have yo

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 12:47, Vishal wrote: > $ie.span(:text ,"Documents").span(:index,1).fire_event('onMouseDown') Try this: $ie.span(:text ,"Documents").span(:index,1).click Did you ask a developer which event should be fired? That is usually the quickest way to find it out. Željko --~--~-

[wtr-general] Re: problem with fill fields on a login page (maybe frame problem)

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 12:50, Alexander Fedtke < alexander.fed...@googlemail.com> wrote: > Any idea what i can check to make it run? Check if the same page is displayed at your machine. Frame or text field name or id could be different. Željko --~--~-~--~~~---~--~---

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Vishal
I tried that too, Its not clicking. Our application has implemented the Tab feature from below link. http://extjs.com/deploy/dev/examples/tabs/tabs.html On Apr 24, 3:49 pm, Željko Filipin wrote: > On Fri, Apr 24, 2009 at 12:47, Vishal wrote: > > $ie.span(:text ,"Documents").span(:index,1).fi

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 13:04, Vishal wrote: > http://extjs.com/deploy/dev/examples/tabs/tabs.html Now you are talking. :) I have played a bit with the page, but clicking link via click or firing onclick event does not open tab. Did you ask a developer which event should be fired? Željko --~-

[wtr-general] image test

2009-04-24 Thread Alexandre
Hello, i have such code: while ff.image(:id, "suivante").include? ff.image(:id, "suivante").click end But at the last page, even if image(:id. "suivante") does not exist in the current page ff wants to clik on it.. what is wrong? Error message: /var/lib/gems/1.8/gems/firewatir-1.6.2/lib/fire

[wtr-general] Re: How do I get the page status (200, 404, 500, etc)

2009-04-24 Thread Jarmo Pertman
Oh, you're right! I forgot to think anything about sessions and cookies :/ In that way it should be indeed easier just to scan page html... But anyway, I don't see why such things are needed. Why won't you just create normal tests, which assert multiple things and they would fail for sure if page

[wtr-general] buttons don't recollect button html tag

2009-04-24 Thread TCBlues
Hæ, I'm trying to get all the tags in a html page using the buttons method but all I get are the buttonFour ... the ruby code: require 'watir' ie=Watir::IE.new ie.goto("file:///C:/myPage.htm") ie.buttons.each{|myB| puts myB.id } all I get is: buttonOne, buttonTwo, buttonThree but not butt

[wtr-general] Re: buttons don't recollect button html tag

2009-04-24 Thread TCBlues
Sorry I did a mistake... all I get is button1, button2, button3 and not button4 :) --~--~-~--~~~---~--~~ 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@googlegrou

[wtr-general] image test

2009-04-24 Thread Alexandre
Hello, i have such code: while ff.image(:id, "suivante").include? ff.image(:id, "suivante").click end But at the last page, even if image(:id. "suivante") does not exist in the current page ff wants to clik on it.. what is wrong? Error message: /var/lib/gems/1.8/gems/firewatir-1.6.2/lib/fire

[wtr-general] Re: problem with fill fields on a login page (maybe frame problem)

2009-04-24 Thread Alexander Fedtke
I am also using IE 7 like my collegue where the script is aswell working. the tutorial google script runs at booth desks --- # the Watir controller require "watir" # set a variable test_site = "http://www.google.com"; # open the IE browser ie = Watir::IE.new # print some comme

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Vishal
I asked the Developers they are saying when we click on Tabs , javascript from Extjs is called and tab contents are displayed. On Apr 24, 4:12 pm, Željko Filipin wrote: > On Fri, Apr 24, 2009 at 13:04, Vishal wrote: > >http://extjs.com/deploy/dev/examples/tabs/tabs.html > > Now you are talking.

[wtr-general] Re: I am facing weird issue

2009-04-24 Thread Željko Filipin
And what is the problem? Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ 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, p

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 14:26, Vishal wrote: > I asked the Developers they are saying when we click on Tabs , > javascript from Extjs is called and tab contents are displayed. You need more detailed answer. Which javascript event is fired when tab is clicked? Answer could be something like: oncli

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Vishal
Onclick event is fired. On Apr 24, 5:34 pm, Željko Filipin wrote: > On Fri, Apr 24, 2009 at 14:26, Vishal wrote: > > I asked the Developers they are saying when we click on Tabs , > > javascript from Extjs is called and tab contents are displayed. > > You need more detailed answer. Which javasc

[wtr-general] Re: image test [solved]

2009-04-24 Thread Alexandre
ok: it works with .exists? (i do not know why) -- Alexandre Delanoë --~--~-~--~~~---~--~~ 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

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 14:39, Vishal wrote: > Onclick event is fired. I tried to fire onclick event on one tab, and it did not open tab. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Vishal
Yes, I too had tried Onclick event. Its not working. Do you have any other suggestions? On Apr 24, 5:41 pm, Željko Filipin wrote: > On Fri, Apr 24, 2009 at 14:39, Vishal wrote: > > Onclick event is fired. > > I tried to fire onclick event on one tab, and it did not open tab. > > Željko --~--~--

[wtr-general] Re: Unable to click on Tabs

2009-04-24 Thread Željko Filipin
On Fri, Apr 24, 2009 at 14:53, Vishal wrote: > Do you have any other suggestions? Ask your developer(s) are they sure that onclick is fired. If the answer is yes, show them how your code can open tab when firing that event. Željko --~--~-~--~~~---~--~~ You receiv

[wtr-general] Re: image test [solved]

2009-04-24 Thread Gar Morley
Hi Alexandre, The .exists? method is used to find out if an element exists on the page, so that is the correct method to use in your code example. In the Ruby world, the .include? method is used to to find out if the object includes another object. For example, both of the following would return

[wtr-general] Re: image test [solved]

2009-04-24 Thread Alexandre
Le vendredi 24 avril de l'année 2009, vers 07 heures et 08 minutes, Gar Morley écrivait: [...] > > Hope that helps. Sure! Thank you very much. -- Alexandre Delanoë --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[wtr-general] Re: Watir/Rspec

2009-04-24 Thread «°¤§ømåtïçCðrp§ë¤°»
If I want to include an 'if' clause, then how should I do that; with/ without the assertion(s)? I'm trying to automate the creation of a new instance of a browser (with a target url), if none is found; so I would like it to catch as an exception and then exit, without throwing an exception that t

[wtr-general] Re: problem with fill fields on a login page (maybe frame problem)

2009-04-24 Thread George
I'm not sure if this helps as I am still learning myself. Using ie.show_frames gives this output: there are 54 frames frame index: 1 name: frmEnginePrint frame index: 2 name: frmEngineTop frame index: 3 name: frmEngineLeft frame index: 4 name: frmDashboard frame index: 5 name: frmR12 frame

[wtr-general] Re: How do I get the page status (200, 404, 500, etc)

2009-04-24 Thread marekj
Maybe we need to make some distinctions here. I view Watir as a 'browser driver' in the sense that it talks to the DocumentObjectModel of a browser and doesn't care how the browser deals with http protocol (well, we can maybe peek a bit). Watir API is talking to the final composition of html, js,

[wtr-general] Re: Preference for where to put example improvements?

2009-04-24 Thread Bret Pettichord
It might also be time to make this a more formal project. Put it on github or something. Just a thought. Bret JArkelen wrote: > I'm the author of the HTML report example. I have no problem with > changes, but if you want to describe extra functionality, maybe it is > good to add it at the end o

[wtr-general] Re: Attach to changing URL

2009-04-24 Thread bobwashington
I thought about this some a little more and I think I get what you are saying. However I need a way to get at the browser window before I can capture the url. Is there a way for Watir to give me a list of all browser sessions current open. Then couldn't I do something like browser.url to get th

[wtr-general] Watir Vision

2009-04-24 Thread Bret Pettichord
Some notes on my original vision behind Watir: http://www.io.com/~wazmo/blog/archives/2009_04.html#000293 I'm thinking of writing more about this. If you would like to read more, please send questions. You can post them on the blog, or here, or send me private emails or twitter replies. Whateve

[wtr-general] Re: trying to access text_field, but getting link instead?!

2009-04-24 Thread Bret Pettichord
Jarmo Pertman wrote: > Okay, back to the original problem. I code similar to this: > > if $browser.text_field(:id, "blah").exists? >do something with text field > elsif $browser.select_list(:id, "blah").exists? >do something with select list > else >raise "blah not found" > end > > thi

[wtr-general] Re: Attach to changing URL

2009-04-24 Thread Bret Pettichord
bobwashing...@hotmail.com wrote: > I thought about this some a little more and I think I get what you are > saying. However I need a way to get at the browser window before I > can capture the url. Is there a way for Watir to give me a list of > all browser sessions current open. Then couldn't

[wtr-general] Re: buttons don't recollect button html tag

2009-04-24 Thread orde
isn't the same as . Take a look at these pages: http://www.w3schools.com/tags/tag_button.asp http://www.w3schools.com/tags/tag_input.asp So, the watir button method isn't recognizing . Hope that helps. On Apr 24, 4:29 am, TCBlues wrote: > Sorry I did a mistake... all I get is button1, butt

[wtr-general] Clicking on the nth table cell hyperlink that might exist in a row/record

2009-04-24 Thread George
** Note: I apologize in advance...this is rather lengthy. ** Hello all, OK, I was presented with quite a challenge (at least for me). I have a table that contains a column that might or might not have a hyperlink. I'm supposed to find and click the second instance of that link. I came up with

[wtr-general] Re: Clicking on the nth table cell hyperlink that might exist in a row/record

2009-04-24 Thread George
Here is what I came up with: require 'watir' $ie = Watir::IE.attach(:title, /Express/) $ie.speed = :zippy def record(index) # This defines one record num = index * 3 $ie.form(:id, "aspnetForm").table(:id, "resultSet").row(:index, "# {num.to_s}") end def company_name(row) # this grabs th

[wtr-general] Re: Watir Vision

2009-04-24 Thread Wesley Chen
Hi, Bret, I would like to ask you a question. Watir has been a popular web automation testing tool now, so many companies and testers have benefited from it, in fact, they benefited from your share and creativity. What's your next step for it? Improve the stable, recommend it more? Some people said