Hi All

I tried the same with Selenium and QTP and they work for that web page.

Can anyone tell me why watir is failing in such a scenario? Am I overlooking
some things in watir?


On Fri, Jun 12, 2009 at 11:01 AM, Pallavi Sharma <write2pall...@gmail.com>wrote:

> Hey George/Chuck
>
> Thanks for the response so far, i am afraid the site is internal so you
> wont be able to access it.
>
> I tried the same with QTP, it worked, i will try it with other open source
> available today like selenium and sahi and see if they work in this
> scenario.
>
> Also i am going to try what you have suggested chuck and lets see i hope to
> solve this soon.
>
> I wish i had known the reason why watir is not working here? is it a known
> issue? What is their with watir due to which it is failing in here.??
>
>
>
>
> On Fri, Jun 12, 2009 at 1:03 AM, Chuck van der Linden <sqa...@gmail.com>wrote:
>
>>
>> You probably need to show what you are doing to your dev, and ask
>> them.
>>
>> perhaps their is some other object that needs to see an event of some
>> sort..
>>
>> not sure what to suggest without being able to see the actual site,
>> and all the html and script code.
>>
>> You could try taking the sendkeys idea a bit further.    Play a bit
>> with the site and see if it's possible, via clicking on the list, and
>> then using nothing but keyboard, to select the proper list item
>> (usually by typing in it's name) and entering it as your selection
>> (typically tab or enter)  and see if that works.
>>
>> The only other thing I could suggest (I've seen people do this, but
>> not done it myself) would be to directly invoke the appropriate client
>> side script function.  Not a big fan of that myself, because
>> potentially the site could be broken (NOT invoking that code) but if
>> your script invokes it directly, it would still show the site as
>> working.  or if the name of the script or function changes, the site
>> might be working, but your watir code would break.
>>
>> On Jun 10, 11:12 pm, Pallavi Sharma <write2pall...@gmail.com> wrote:
>> > Hi George/Chuck/Zeljko
>> >
>> > I tried the following script:
>> >
>> > require 'watir'
>> > require 'watir/ie'
>> > require 'win32ole'
>> >
>> > ie=Watir::IE.attach(:title,//)
>> > ie.frame(:name, "pageserverFrame").frame(:id,
>> > "ContentFrame").select_list(:name, "MIR-CVG-STBL-1-CD").clearSelection
>> > ie.frame(:name, "pageserverFrame").frame(:id,
>> > "ContentFrame").select_list(:name,
>> > "MIR-CVG-STBL-1-CD").fire_event("onfocus")
>> > ie.frame(:name, "pageserverFrame").frame(:id,
>> > "ContentFrame").select_list(:name, "MIR-CVG-STBL-1-CD").select("30
>> Years")
>> > ie.frame(:name, "pageserverFrame").frame(:id,
>> > "ContentFrame").select_list(:name,
>> > "MIR-CVG-STBL-1-CD").fire_event("onchange")
>> > ie.send_keys("{TAB}")
>> >
>> > but it only selects the value in the list,  and doesn't set the same in
>> the
>> > tet box..
>> >
>> > is there any other solution? Why isn't watir doing it the way it should
>> > work!!
>> >
>> > Help needed!! Anyone please...
>> >
>> >
>> >
>> > On Thu, Jun 11, 2009 at 2:17 AM, George <george.sand...@gmail.com>
>> wrote:
>> >
>> > > Hi Pallavi,
>> >
>> > > I've been having similar issues where manually using a select list
>> > > exhibits different behavior than coding a selection.  I had to figure
>> > > out how to best mimic how a user would interact with the form.
>> > > Eventually I found that, if I select the field label, set the value in
>> > > the select list, then use $browser.send_keys("{TAB}") to tab off the
>> > > field, it gives me the desired effect.  This probably won't help you,
>> > > but this is what I had to do in order to get what I was looking for.
>> >
>> > > Good luck!
>> >
>> > > George
>> >
>> > > On Jun 8, 10:49 pm, Pallavi Sharma <write2pall...@gmail.com> wrote:
>> > > > Hi
>> >
>> > > > I have a scenario in which, if i chose a value in a select list, the
>> same
>> > > > value is filled in a text box given by calling an onchange event.
>> >
>> > > > code looks like:<select name="ABC"
>> onChange="onChangeTerm('ABC','XYZ')"
>> > > > onfocus="enterField(this)" size="1" stype="Selection">
>> >
>> > > > <input decimals="0" elength="3" name="XYZ"
>> onblur="validateField(this)"
>> > > > onfocus="enterField(this)" onkeypress="NumberKeyCheck()"
>> stype="Number"
>> > > > type="text" value="0" />
>> >
>> > > > The problem with this is when i do it manually, whatever value i
>> chose in
>> > > > select list, it gets filled in the text box but when i do using the
>> > > > function:
>> >
>> > > > ie.select_list(:name,"ABC").select(value)
>> >
>> > > > it selects a value but doesn' fills the text box.
>> >
>> > > > I tried the fire events also but no help.
>> >
>> > > > Can anyone in the group please help me with this issue.
>> >
>> > > > [watir -1.6.2]
>> >
>> > > > Thanks- Hide quoted text -
>> >
>> > - Show quoted text -
>> >>
>>
>
>

--~--~---------~--~----~------------~-------~--~----~
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