[wtr-general] Help needed in automation using Watir

2009-05-14 Thread lokesh.agra...@gmail.com
Hi All, I am doing web application automation using Watir. The problem I am facing is, whenever we get a new build from developers there are changes in id, name of some objects. Due to which our scripts fails and manually we need to find what are the changes by viewing source code. This is

[wtr-general] Re: Help needed in automation using Watir

2009-05-14 Thread karim rayani
when doing automation, any testing tool has the concept of object identification be it QTP, SILKTEST etc, you can try to use indexing if possible for object identification, the developer can change the name, id etc indexing can help, but mind you that can also change if the devs donot understand

[wtr-general] Re: Help needed in automation using Watir

2009-05-14 Thread Vicky Goyal
If you use IDE, that would help you to work little better. Dunno if you using that or not. Apart from that, i don't think there would be a solution.. only developers should feel little mercy.. :) On May 14, 12:02 pm, Lokesh Agrawal lokesh.agra...@gmail.com wrote: Thanks Alkarim, Is there any

[wtr-general] Re: Help needed in automation using Watir

2009-05-14 Thread karim rayani
you can use the IE developer tool bar on IE and firebug on firefox for object identification, there is no special object spy which i know off for watir, i largely believe these are the tools which are widely used for object identification for watir. If there is any thing for object spying like

[wtr-general] Re: jssh (firefox) and unicode

2009-05-14 Thread Frank
Hallo, with the following code i got i working on Windows with IE and Firefox (for Linux you might need to omit or change the conversion to a different encoding than CP1252). The first part i got from the other thread Watir utf-8 (japnese) support. It might not work for Japanese strings, because

[wtr-general] Re: Why this autoit code is not working? its doing send keys in the browser URL address area instead of in the text_field area.

2009-05-14 Thread satish
Can some one help me on this? Thanks Satish. On May 13, 4:26 pm, satish spanchumar...@gmail.com wrote: text_field is on the browser it self. No popups involved here. Thanks Satish. On May 13, 4:21 pm, Anu Gangavaram anuwri...@gmail.com wrote: where is the text field, on the browser

[wtr-general] Re: How to move the cursor to starting point in a masked text_field.

2009-05-14 Thread satish
Can any one help me on this? Thanks Satish. On May 13, 4:17 pm, satish spanchumar...@gmail.com wrote: Here is my HTML for that  Active Element: [INPUT], Index: [536]  INPUT class=dxeEditArea onkeypress=aspxEKeyPress

[wtr-general] Re: How to fetch the Selected Item in a ListBox

2009-05-14 Thread sHiVa
Use this code for retriving the current value of a list box selectedItem= ie.select_list(:name,'List box name').value Regards Siva Phaneednra Krapa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General

[wtr-general] Re: How to fetch the Selected Item in a ListBox

2009-05-14 Thread Darin Duphorn
My bad, you want to get the current value correct? Current_item = Listbox(:id,'blah).getSelectedItems.to_s From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Darin Duphorn Sent: Thursday, May 14, 2009 8:51 AM To:

[wtr-general] Re: javascript popup window not responding to startClicker

2009-05-14 Thread jason
oh my god! well done!!! I say this without having tried it out - but it seems so obvious!. I must say this whole frame thing is a pain in the a** I will let you know how it integrate it - thanks a million. !!! On 14 Mai, 07:49, jarodzz jaro...@gmail.com wrote: Hi, Jason. After hacked

[wtr-general] Call for help! I meet a proble when I use the test/unit

2009-05-14 Thread jingshi.wan...@alibaba-inc.com
when I run the following code require 'test/unit' class TC_Pram Test::Unit::TestCase def initialize(name) @name=name end def test_array puts assert_equal(2,@name[2]) end end tc=TC_Pram.new(wang) tc.test_array there are some errors as follows

[wtr-general] kiosk mode?

2009-05-14 Thread phil
Is there any way to have Watir open IE in kiosk mode? Thanks! --~--~-~--~~~---~--~~ 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,

[wtr-general] Re: Help needed in automation using Watir

2009-05-14 Thread Jim Matthews
Lokesh, Your problem is not so much identifying objects as much as having your developers not change their ids. Your developers should be assigning unique ids to controls that you use including input fields and buttons. They should not be making arbitrary changes to ids, just like they should

[wtr-general] Re: I want to ask a question about test/unit frame

2009-05-14 Thread Felipe Knorr Kuhn
Try adding require test/unit/assertions include Test::Unit::Assertions 2009/5/14 jingshi.wan...@alibaba-inc.com arto...@gmail.com: Hi, all   when I run the following code require 'test/unit' class TC_Pram Test::Unit::TestCase   def initialize(name)     @name=name   end   def

[wtr-general] Re: Traversing nested elements

2009-05-14 Thread jason
Gofu, I am not quite sure what you need. you can select any element and ask it for containing elements. for example: ff.frame(:index, 1).links gives you all the links in the container frame (the first one). ff.form(:index,2).links gives you all the links within the second form on the

[wtr-general] Re: How to move the cursor to starting point in a masked text_field.

2009-05-14 Thread satish
can some one help me on this? Satish On May 14, 8:21 am, satish spanchumar...@gmail.com wrote: Can any one help me on this? Thanks Satish. On May 13, 4:17 pm, satish spanchumar...@gmail.com wrote: Here is my HTML for that  Active Element: [INPUT],

[wtr-general] Re: Why this autoit code is not working? its doing send keys in the browser URL address area instead of in the text_field area.

2009-05-14 Thread satish
Can some one help me on this? Satish. On May 14, 8:20 am, satish spanchumar...@gmail.com wrote: Can some one help me on this? Thanks Satish. On May 13, 4:26 pm, satish spanchumar...@gmail.com wrote: text_field is on the browser it self. No popups involved here. Thanks Satish.

[wtr-general] Re: Help needed in automation using Watir

2009-05-14 Thread Željko Filipin
2009/5/14 Jim Matthews jim_m...@swbell.net If they don't respond, then you should talk to your manager who is interested in having automated tests +1 Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir

[wtr-general] Re: Why this autoit code is not working? its doing send keys in the browser URL address area instead of in the text_field area.

2009-05-14 Thread kiran
Hi sathish, Try to use fire_event actions on the text_field. I think it would help you. It is something like this ie.text_field().fire_event(OnClick) see the source code. Thanks, kiran. On May 14, 7:50 pm, satish spanchumar...@gmail.com wrote: Can some one help me on this? Satish. On May

[wtr-general] Re: How to move the cursor to starting point in a masked text_field.

2009-05-14 Thread Željko Filipin
2009/5/14 satish spanchumar...@gmail.com can some one help me on this? Maybe I could if you provided more information: 1) screen shot 2) html of the page (save it to your machine, open in web browser and see if you can reproduce the problem with saved page) Željko

[wtr-general] Re: Why this autoit code is not working? its doing send keys in the browser URL address area instead of in the text_field area.

2009-05-14 Thread satish
I tried following. That did not help either. For some reason its starting typing from at the end of the Phone MASK. (___) ___- ie.text_field(:id, ctl00_contentChildWindow_secUserDetails_subsecUserInfo_txtPhoneNumber_txtMaskTextBox_I).fire_event ('onblur') ie.text_field(:id,

[wtr-general] Re: kiosk mode?

2009-05-14 Thread kiran
Hi phil, I think it would help you. system('C:\\Program Files\\Internet Explorer\\iexplore.exe -k') Thanks, kiran. On May 14, 6:27 pm, phil p...@philsmy.com wrote: Is there any way to have Watir open IE in kiosk mode? Thanks! --~--~-~--~~~---~--~~ You

[wtr-general] Re: How to move the cursor to starting point in a masked text_field.

2009-05-14 Thread sHiVa
Dude, Please use this before setting a value in your text field and let me know if any issue. ie.text_field(:id, ctl00_contentChildWindow_secUserDetails_subsecUserInfo_txtPhoneNumber_txtM­ askTextBox_I).clear ie.text_field(:id,

[wtr-general] Re: kiosk mode?

2009-05-14 Thread phil
Um, yes, I know how to open IE in kiosk from a system call - how can I do it via Watir? Or is there something else you are not telling me? On May 14, 6:13 pm, kiran gki...@gmail.com wrote: Hi phil, I think it would help you. system('C:\\Program Files\\Internet Explorer\\iexplore.exe -k')

[wtr-general] Re: kiosk mode?

2009-05-14 Thread sHiVa
Hi Phil, You can open internet explorer in kiosk mode using the kiran's method. Where you can open the explorer only. Later if you want to drive the browser, you need to use attach method for automate the browser. Follow the send keys method where you can not necessary to open the browser and

[wtr-general] Re: Why this autoit code is not working? its doing send keys in the browser URL address area instead of in the text_field area.

2009-05-14 Thread satish
Here is HTML code.. == Active Element: [INPUT], Index: [536] INPUT class=dxeEditArea onkeypress=aspxEKeyPress ('ctl00_contentChildWindow_secUserDetails_subsecUserInfo_txtPhoneNumber_txt­ MaskTextBox', event)

[wtr-general] Re: How to move the cursor to starting point in a masked text_field.

2009-05-14 Thread satish
No, this does not work either. Only thing seems to work is with .value and put some wait command like (sleep 3). ie.text_field(:id, ctl00_contentChildWindow_secUserDetails_subsecUserInfo_txtPhoneNumber_txtM­­ askTextBox_I).value = 12345678901234567890 Mask is not working properly with .set

[wtr-general] Re: How to move the cursor to starting point in a masked text_field.

2009-05-14 Thread satish
Thank you very much to you all for kind reply. Satish. On May 14, 1:38 pm, satish spanchumar...@gmail.com wrote: No, this does not work either. Only thing seems to work is with .value and put some wait command like (sleep 3). ie.text_field(:id,

[wtr-general] How to work with popups?

2009-05-14 Thread satish
Can you some one give me an idea how to work with popups. Here is my requirement. - When I click on Save image icon on the IE browser, according to data validation rules I will get a warning popup box. I will have to validate the warning message on the

[wtr-general] Re: How to work with popups?

2009-05-14 Thread Lisa Crispin
There was a recent thread on this so you may want to search the email archive. This is what we do, but I don't know if it is the best way. require 'watir\ie' require 'watir\contrib\enabled_popup' # Main method to click a modal dialog button. def click_modal_button(ie, type='OK',

[wtr-general] Re: Help needed in automation using Watir

2009-05-14 Thread Lokesh Agrawal
Hi All, Thanks for the reply. I am already using IE development toolbar, but that's not the issue. I think Jim is very much clear in his statement and I have to talk to developers and manager for this problem. BUT I think it will be good for future of Watir if we can have some object

[wtr-general] Re: How to fetch the Selected Item in a ListBox

2009-05-14 Thread Pallavi Sharma
Hey Thanks... this works Current_item = Listbox(:id,’blah).getSelectedItems[0] the value option doesn't works Shiva On Thu, May 14, 2009 at 7:24 PM, Darin Duphorn dduph...@redbrickhealth.comwrote: My bad, you want to get the current value correct? Current_item =

[wtr-general] Re: Traversing nested elements

2009-05-14 Thread karimnumerouno
i guesss you can xpath or hpricot libraries which are very powerful for screen scrapping From, Karim Rayani On May 14, 7:42 pm, jason jason.franklin.sto...@gmail.com wrote: Gofu, I am not quite sure what you need. you can select any element and ask it for containing elements. for