I added a 30 second sleep because the page is still processing info when it
loads and the button does not exist and it worked fine for me. You might not
need to wait that long just the first value I tried.
require 'watir'
ie=Watir::IE.new
ie.goto("www.makemytrip.com")
ie.link(:href,"http://www.makemytrip.com/international-flights/";).click
ie.text_field(:id,"departure_0").set("Delhi,India-Indira Gandhi Intl(DEL)")
ie.text_field(:id,"arrival_0").set("Chicago,US-All airports-IL(CHI)")
ie.image(:src,"http://www.makemytrip.com/images/search-for-flights.gif
").click
sleep 30
ie.image(:src,"
http://cheapfaresindia.makemytrip.com/international/img/us/booknow.gif
").click


Thanks,
Eric

On Mon, May 11, 2009 at 11:55 PM, Pallavi Sharma <write2pall...@gmail.com>wrote:

> Nothing happens.
>
> Anyone here, could you please help.
>
> Need a solution badly.
>
>
>
>
>
> On Mon, May 11, 2009 at 7:48 PM, Ravi <myrav...@gmail.com> wrote:
>
>>
>> Insert the following line after clicking search-for-flights.gif:
>>
>> Watir::Waiter.wait_until{ie.image(:src,"http://
>> cheapfaresindia.makemytrip.com/international/img/us/
>> booknow.gif").exist?}
>>
>>
>>
>> On May 11, 1:56 am, Pallavi Sharma <write2pall...@gmail.com> wrote:
>> > You are right Santosh, this is exactly the problem, i was trying to
>> potray
>> > but thanks for making it clear, watir gets hanged after executing the
>> second
>> > last step. No step after it gets executed.
>> >
>> > On Mon, May 11, 2009 at 12:15 PM, SANTOSH SOLAPURKAR <
>> >
>> >
>> >
>> > sansolapur...@gmail.com> wrote:
>> > > Hi All,
>> >
>> > > This doent seem to be frame or other issue at all, what i see this as
>> there
>> > > is a problem with the website itself.
>> > > once we do the search for the international flights the web page
>> doesnot
>> > > completely load, as in eventhough it
>> > > shows done it still keeps on downloading some thing probably
>> javascript
>> > > namely sort(5). To test this you can do
>> > > a simple test. after the ie.image(:src,"
>> > >http://www.makemytrip.com/images/search-for-flights.gif";).click
>> statement
>> > > put a puts command to print some thing and run the script. this still
>> hangs
>> > > and doenot print any thing on console
>> > > .
>> > > require 'watir'
>> >
>> > > ie=Watir::IE.new
>> > > ie.speed=:fast
>> >
>> > > ie.goto("www.makemytrip.com")
>> > > ie.link(:href,"http://www.makemytrip.com/international-flights/
>> ").click
>> > > ie.text_field(:id,"departure_0").value="Delhi,India-Indira Gandhi
>> > > Intl(DEL)"
>> > > ie.text_field(:id,"arrival_0").value="Chicago,US-All airports-IL(CHI)"
>> > > ie.image(:src,"
>> http://www.makemytrip.com/images/search-for-flights.gif";).click
>> > > #This works, after which IDE hangs
>> > > puts "the page has loaded" # This never gets executed......
>> > > #ie.image(:src,"
>> > >http://cheapfaresindia.makemytrip.com/international/img/us/booknow.gif
>> ").click
>> > > #DOESNT GET EXECUTED
>> >
>> > > I dont know how to resolve this but need to stop the java script from
>> > > downloading .....
>> >
>> > > Hope we resolve this..
>> >
>> > > Cheers,
>> > > Santosh
>> >
>> > > On Mon, May 11, 2009 at 11:02 AM, Pallavi Sharma <
>> write2pall...@gmail.com>wrote:
>> >
>> > >> Hi Everyone
>> >
>> > >> require 'watir'
>> > >> ie=Watir::IE.new
>> > >> ie.speed=:fast
>> > >> ie.goto("www.makemytrip.com")
>> > >> ie.link(:href,"http://www.makemytrip.com/international-flights/
>> ").click
>> > >> ie.text_field(:id,"departure_0").value="Delhi,India-Indira Gandhi
>> > >> Intl(DEL)"
>> > >>  ie.text_field(:id,"arrival_0").value="Chicago,US-All
>> airports-IL(CHI)"
>> > >> ie.image(:src,"
>> http://www.makemytrip.com/images/search-for-flights.gif";).click
>> > >> #This works, after which IDE hangs
>> > >> ie.image(:src,"
>> > >>
>> http://cheapfaresindia.makemytrip.com/international/img/us/booknow.gif
>> ").click
>> > >> #DOESNT GET EXECUTED
>> >
>> > >> Thanks for the reply so far, but i just want to clear my
>> understanding,
>> > >> The last step of the above script is not getting executed, the reason
>> for it
>> > >> is because 'watir' is not able to access the frames on the page.
>> >
>> > >> But I have checked with IE Devloper tool bar there are no frames on
>> the
>> > >> Search Result page, which you get after you execute the second last
>> step of
>> > >> the script.
>> >
>> > >> I am sorry, if i am missing something out from the answers i have
>> recieved
>> > >> sod far, but i am not able to understand why this above script is not
>> > >> getting executed.
>> >
>> > >> Meanwhile i have tried the above on 5 different machines, but it
>> doesn't
>> > >> works.
>> >
>> > >> On Sun, May 10, 2009 at 6:14 AM, Vicky Goyal <
>> vikasrattango...@gmail.com>wrote:
>> >
>> > >>> @Pallavi
>> >
>> > >>> As siva has mentioed, tht same defect is already open.
>> > >>> If you are not able to see the frames of a link in command bar, you
>> > >>> will not be able to access the objects in that link.
>> > >>> not very sure, i guess this s because some latest patches might be
>> > >>> missing from our personal desktops.
>> >
>> > >>> As when i tried in my organization, infosys, same was wrking.
>> >
>> > >>> Now what you can do is to access those links, you can use Firefox
>> > >>> browser, that should not give any issues.
>> > >>> siva has tried the script, though i am sturuggling right now to
>> > >>> install the latest version for same.
>> > >>> hope this helps
>> >
>> > >>> regds
>> > >>> Vicky
>> > >>> Vikas Rattan Goyal
>> > >>> Test Lead, Telecommunication
>> > >>> Infosys Tech Ltd
>> >
>> > >>> On May 9, 1:57 pm, sHiVa <krapa.ph...@gmail.com> wrote:
>> > >>> > I tried to print the frame set in a page using this code snippet
>> and
>> > >>> > able to view frmaes
>> >
>> > >>> > require 'watir'
>> > >>> > ie=Watir::IE.start('http://www.quackit.com/html/templates/frames/
>> > >>> > frames_example_3.html')
>> > >>> > puts ie.show_frames
>> >
>> > >>> > But when i tired to print the frames inwww.makemytrip.com,
>>  'access
>> > >>> > denied' error is displayed. Might be the error is not due to
>> > >>> > security.There might be an another issue.
>> >
>> > >>> > I have seen a defect in zira regarding this.
>> >
>> > >>> >http://jira.openqa.org/browse/WTR-96
>> >
>> > >>> > Regars
>> > >>> > Siva Phaneendra Krapa
>> >
>> > > --
>> > > Santosh Solpaurkar
>> > > Software Engineer
>> > > CGI Mumbai
>> >
>> > --
>> > Regards,
>> > Pallavi Sharma
>> >
>> > CresTech Software Systems Pvt. Ltd.
>> > Your Testing Partner
>> > Testing Services | Consulting | Resourcing | Trainings
>> > HP Mercury Gold Partner | IBM Business partner
>> > Tel: 0120-4320421 | Mobile No +91-9971022177 |www.crestech.in
>>
>>
>
>
> --
> Regards,
> Pallavi Sharma
>
> CresTech Software Systems Pvt. Ltd.
> Your Testing Partner
> Testing Services | Consulting | Resourcing | Trainings
> HP Mercury Gold Partner | IBM Business partner
> Tel: 0120-4320421 | Mobile No +91-9971022177 |
> www.crestech.in
>
> >
>

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