[wtr-general] Re: Logging to file with Firefox

2009-05-11 Thread ash
Full script with line numbers (followed by the full error); 1 #-# 2 require 'watir' 3 require 'test/unit' 4 require 'example_logger1' 5 6 class TC_go_to_homepage < Test::Unit::TestCase 7 8 def start 9 Watir::Browser.default = 'firefox

[wtr-general] Re: Unable to attach to a page on makemytrip

2009-05-11 Thread Pallavi Sharma
Nothing happens. Anyone here, could you please help. Need a solution badly. On Mon, May 11, 2009 at 7:48 PM, Ravi wrote: > > Insert the following line after clicking search-for-flights.gif: > > Watir::Waiter.wait_until{ie.image(:src,"http:// > cheapfaresindia.makemytrip.com/international/im

[wtr-general] Re: Problems dealing with javascript popups

2009-05-11 Thread kiran
Hi, Use threads,it may help. some thing like this t=Thread.new{ pop-up code } t.join Thanks, kiran. On May 12, 10:13 am, SushilKarwa wrote: > Any help is much appreciated > > Regards, > S.K > > On May 11, 6:12 pm, SushilKarwa wrote: > > > Hi Group, > > I am struggling to handle the Ja

[wtr-general] Re: Problems dealing with javascript popups

2009-05-11 Thread SushilKarwa
Any help is much appreciated Regards, S.K On May 11, 6:12 pm, SushilKarwa wrote: > Hi Group, >     I am struggling to handle the JavaScript popups. Let me explain my > scenario to you guys. > In my web application am executing certain URL. Once that url is > executed it pops up a javaScrip

[wtr-general] file download popup handle

2009-05-11 Thread curious
I put below code in order to automate file download popup.. ie.button(:name, "Button5").click . when WATIR reaches above code.. File download popup shows up.. and the code below should handle this popup and save the file to be downloaded.. however, the code is just sitting there.. '

[wtr-general] Watir::IE.new - how does the IE object differ from a normal Windows IE instance?

2009-05-11 Thread Jason
The question: how does the Internet Explorer object created via Watir (Watir::IE.new) differ from an Internet Explorer object opened the traditional way via Windows? I'm not sure it's supposed to be different, but I'm observing the following: We've created some AB testing variations using the Go

[wtr-general] Re: How to click on a text in side the SPAN tag. ["puts ie.div(:id,'divSiteMapControl').innerText" = "Sitemap: Homepage|Administration|Manage Folders|New Folder"]

2009-05-11 Thread satish
Hi Ravi, this worked. Thank you very much...appreciate your help Satish. On May 11, 5:18 pm, Ravi wrote: > Did you try: > > ie.span(:text, "Manage Folders").link(:text,"Manage Folders").click > > On May 11, 4:03 pm, satish wrote: > > > > > Hi marekj, > > > This would work but I have "Manage F

[wtr-general] Re: How to click on a text in side the SPAN tag. ["puts ie.div(:id,'divSiteMapControl').innerText" = "Sitemap: Homepage|Administration|Manage Folders|New Folder"]

2009-05-11 Thread Ravi
Did you try: ie.span(:text, "Manage Folders").link(:text,"Manage Folders").click On May 11, 4:03 pm, satish wrote: > Hi marekj, > > This would work but I have "Manage Folders" in two places in my web > page. I want to make sure I am clicking on this particular link in > this SPAN tag. > Please

[wtr-general] Re: How to click on a text in side the SPAN tag. ["puts ie.div(:id,'divSiteMapControl').innerText" = "Sitemap: Homepage|Administration|Manage Folders|New Folder"]

2009-05-11 Thread satish
Hi marekj, This would work but I have "Manage Folders" in two places in my web page. I want to make sure I am clicking on this particular link in this SPAN tag. Please let me know if you have any other idea. Appreaciate your help Thank you, Satish. On May 10, 11:33 am, marekj wrote: > Manage

[wtr-general] Re: How to click on a text in side the SPAN tag. ["puts ie.div(:id,'divSiteMapControl').innerText" = "Sitemap: Homepage|Administration|Manage Folders|New Folder"]

2009-05-11 Thread satish
Hi Tiffany, for some reason this did not work. Still its high lighting/ clicking whole text of ("Homepage|Administration|Manage Folders|New Folder") instead of the text I need to click which is ("Manage Folders"). Here is my codeplease let me know if you have any other idea. 'marekj ' code sh

[wtr-general] Re: Logging to file with Firefox

2009-05-11 Thread AR
Nevermind, I'm blind. Line numbers still would have helped :D On May 11, 11:03 am, AR wrote: > a) Yes, of course! > b) The error looks like it's being thrown from 'example_logger1' - can > you please post the source of that file?  Keeping the line numbers in > errors helps, too -- it looks like

[wtr-general] Re: Logging to file with Firefox

2009-05-11 Thread AR
a) Yes, of course! b) The error looks like it's being thrown from 'example_logger1' - can you please post the source of that file? Keeping the line numbers in errors helps, too -- it looks like you have removed them. On May 11, 7:55 am, ash wrote: > Having successfully scripted tests in ie and

[wtr-general] Re: IE popup example on wiki.openqa.org

2009-05-11 Thread Alan Baird
Jared - This example has not been updated after the 1.6.2 release. The same general approach should work (starting a new thread to kill the popup) but you might have to replace the browser startup depending on whether or not you are using Browser.new. Alan -Original Message- From: w

[wtr-general] Re: Unable to attach to a page on makemytrip

2009-05-11 Thread Ravi
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 wrote: > You are right Santosh, this is exactly the problem, i was try

[wtr-general] Re: How can we take screen shot when error occurs?

2009-05-11 Thread Mark Anderson
__ Information from ESET NOD32 Antivirus, version of virus signature database 4064 (20090511) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[wtr-general] Problems dealing with javascript popups

2009-05-11 Thread SushilKarwa
Hi Group, I am struggling to handle the JavaScript popups. Let me explain my scenario to you guys. In my web application am executing certain URL. Once that url is executed it pops up a javaScript alert box. >From within the same browser window I need to click on the ok button to get out of th

[wtr-general] Logging to file with Firefox

2009-05-11 Thread ash
Having successfully scripted tests in ie and firefox I tried to add logging. Got it working well in ie but when I try the same with firefox I get the following error; undefined method `set_logger' for # This is a sample of my script which produces the error; #--

[wtr-general] Re: How can we take screen shot when error occurs?

2009-05-11 Thread Prashant
Have a look at Spec::Ui (http://github.com/scudco/rspec-ui/tree/ master) Its Html report automaticaly includes screen-shots for failed tests. ~Prashant On May 11, 4:43 pm, kiran wrote: > Give me the code  that your using. > > On May 11, 4:13 pm, Durgesh Nadkarni > wrote: > > > Hi, > > > I wa

[wtr-general] Re: Loop around table and click on each link

2009-05-11 Thread Shweta
Hi, Thanks Wesley I am able to do it successfully but the condition what i put in if loop is not working if those field values are null also its proceeding. Can anyone suggest what mighht be wrong here? table=ie.table(:id,"accounts") count=table[10].cells.length puts "length of the table is #{c

[wtr-general] Re: How can we take screen shot when error occurs?

2009-05-11 Thread kiran
Give me the code that your using. On May 11, 4:13 pm, Durgesh Nadkarni wrote: > Hi, > > I want to take screen shots of the web pages twice by using following > method. > > screen_capture("somename.jpg",true) > > For first image it works fine. Then I clicked on Submit button for which > there is

[wtr-general] How can we take screen shot when error occurs?

2009-05-11 Thread Durgesh Nadkarni
Hi, I want to take screen shots of the web pages twice by using following method. screen_capture("somename.jpg",true) For first image it works fine. Then I clicked on Submit button for which there is one javascript validation kept. So as soon as I click on Submit button that alert error window a

[wtr-general] Re: Loop around table and click on each link

2009-05-11 Thread Wesley Chen
I may not achieve what you want, but my code below may give you some help. require 'watir' $ie=Watir::IE.attach(:title,//) table=$ie.table(:id,"accounts") count=table[2].cells.length for i in 0..count-1 puts table[2][i+1].innerText table[2][i+1].link(:index, 1).click end Thanks. Wesley

[wtr-general] Re: Loop around table and click on each link

2009-05-11 Thread Shweta
Thanks for reply. HTML Code:

[wtr-general] Re: Loop around table and click on each link

2009-05-11 Thread Wesley Chen
Would you please put your html here? Thanks. Wesley Chen. On Mon, May 11, 2009 at 4:38 PM, Shweta wrote: > > Hi > > I have a scenario where i need to click on every link in table then i > need to verify in next page. > > I was using the below code: > > myTable=ie.table(:index, 10) > iRows=my

[wtr-general] Re: Generate an automated excel report of birthdays today

2009-05-11 Thread Željko Filipin
On Wed, May 6, 2009 at 08:40, Vicky Goyal wrote: > This is my link of webpage from where i need the table data and then > have to insert into an excel sheet. > $ie.link(:url, 'http://172.25.103.20/BCards/').click I can not open it. I get Network Timeout error. > Now after that i need to put the

[wtr-general] Loop around table and click on each link

2009-05-11 Thread Shweta
Hi I have a scenario where i need to click on every link in table then i need to verify in next page. I was using the below code: myTable=ie.table(:index, 10) iRows=myTable.row_count() i=2 while i <= iRows do myTable [i][2].flash myTable [i][1].focus myTable [i][2].click