Re: [Wtr-general] How to click variable link
hi, Thanks!! im getting this problem with HREF 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using HREF and http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 i also tried with href(lower case). but the error was same. im sending the HTML.. HTML :- TD CLASS=RowLevel1 A BORDER=0 CLASS=Image ONCLICK=javascript:toggleRows('m523');toggleImageSource('img2','themes/default/images/open- menu.gif','themes/default/images/closed-menu.gif')IMG ID=img2 SRC='themes/default/images/closed-menu.gif' ALT= ALIGN=absmiddle//A A HREF= http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3; onmouseover=javascript:ShowTooltip('Access detailed quality and quantity assessment page for the selected component.'); onmouseout=javascript:HideTooltip(); sys_asp /A nbsp; /TD TD CLASS=Hide 'sys_asp' is variable link...it is user defined.. please help its very urgent Regards Shalini Gupta On 5/22/07, Željko Filipin [EMAIL PROTECTED] wrote: On 5/22/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: I tried to this with href but its not working. Hi Shalini, What error message do you get when you use href? Can you post your Watir and Ruby code? There is lot of ways you can click a link. I recommend id. Jeff has made page at Watir wiki about it. See http://wiki.openqa.org/display/WTR/Methods+supported+by+Element Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] FireWatir doesn't ignore if it doesn't exists but
Hi Eoin, Are you still facing the problem? try using the latest code from svn. if it's still there ,II will look into it. Regards, Prema On 5/11/07, Bret Pettichord [EMAIL PROTECTED] wrote: I was confused about your problem. It now looks like this is a FireWatir bug. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
can you send the code snippet? On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, Thanks!! im getting this problem with HREF 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using HREF and http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 i also tried with href(lower case). but the error was same. im sending the HTML.. HTML :- TD CLASS=RowLevel1 A BORDER=0 CLASS=Image ONCLICK=javascript:toggleRows('m523');toggleImageSource('img2','themes/default/images/open- menu.gif','themes/default/images/closed-menu.gif')IMG ID=img2 SRC='themes/default/images/closed-menu.gif' ALT= ALIGN=absmiddle//A A HREF= http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 onmouseover=javascript:ShowTooltip('Access detailed quality and quantity assessment page for the selected component.'); onmouseout=javascript:HideTooltip(); sys_asp /A nbsp; /TD TD CLASS=Hide 'sys_asp' is variable link...it is user defined.. please help its very urgent Regards Shalini Gupta On 5/22/07, Željko Filipin [EMAIL PROTECTED] wrote: On 5/22/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: I tried to this with href but its not working. Hi Shalini, What error message do you get when you use href? Can you post your Watir and Ruby code? There is lot of ways you can click a link. I recommend id. Jeff has made page at Watir wiki about it. See http://wiki.openqa.org/display/WTR/Methods+supported+by+Element Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
hi, this is my code snipset def system_link $logger.log(## CAST_HOMEPAGE_05) $logger.log() $logger.log ## System link #\n $logger.log(Description-In Health Factor with lowest grade / System subsection, click System link ) #logs only to corelogger file $logger.log(Expected Output-Outline page displaying Focus on System systemX - part of CORPORATE - for snapshotX snapshot should be displayed ) $logger.log() $ie.link(:id,m522).click #$ie.image(:HREF, http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 ).click end regards shalini On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: can you send the code snippet? On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, Thanks!! im getting this problem with HREF 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using HREF and http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 i also tried with href(lower case). but the error was same. im sending the HTML.. HTML :- TD CLASS=RowLevel1 A BORDER=0 CLASS=Image ONCLICK=javascript:toggleRows('m523');toggleImageSource('img2','themes/default/images/open- menu.gif','themes/default/images/closed-menu.gif')IMG ID=img2 SRC='themes/default/images/closed-menu.gif' ALT= ALIGN=absmiddle//A A HREF= http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 onmouseover=javascript:ShowTooltip('Access detailed quality and quantity assessment page for the selected component.'); onmouseout=javascript:HideTooltip(); sys_asp /A nbsp; /TD TD CLASS=Hide 'sys_asp' is variable link...it is user defined.. please help its very urgent Regards Shalini Gupta On 5/22/07, Željko Filipin [EMAIL PROTECTED] wrote: On 5/22/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: I tried to this with href but its not working. Hi Shalini, What error message do you get when you use href? Can you post your Watir and Ruby code? There is lot of ways you can click a link. I recommend id. Jeff has made page at Watir wiki about it. See http://wiki.openqa.org/display/WTR/Methods+supported+by+Element Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
hi, now im getting this error 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::MissingWayOfFindingObjectException: :href is an unknown way of finding a link ( http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3) Thanks for ur response!! Regards Shalini On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: Hi Shalini, $ie.link(:id,m522).click I cannot fine the link with id 'm522'. but the line you have commented as below #$ie.image(:HREF, http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3;).clickhttp://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3%22%29.click I changed the image to link as its the href for the link. and put lower case for href it works. The error was there was a space before the url http://; removed that also. $ie.link(:href,'http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3%27%29.click Try this.. hope it works. Regards, Prema On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, this is my code snipset def system_link $logger.log(## CAST_HOMEPAGE_05) $logger.log() $logger.log ## System link #\n $logger.log(Description-In Health Factor with lowest grade / System subsection, click System link ) #logs only to corelogger file $logger.log(Expected Output-Outline page displaying Focus on System systemX - part of CORPORATE - for snapshotX snapshot should be displayed ) $logger.log() $ie.link(:id,m522).click #$ie.image(:HREF,http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 ).click end regards shalini On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: can you send the code snippet? On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, Thanks!! im getting this problem with HREF 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using HREF and http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 i also tried with href(lower case). but the error was same. im sending the HTML.. HTML :- TD CLASS=RowLevel1 A BORDER=0 CLASS=Image ONCLICK=javascript:toggleRows('m523');toggleImageSource('img2','themes/default/images/open- menu.gif','themes/default/images/closed-menu.gif')IMG ID=img2 SRC='themes/default/images/closed-menu.gif' ALT= ALIGN=absmiddle//A A HREF= http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 onmouseover=javascript:ShowTooltip('Access detailed quality and quantity assessment page for the selected component.'); onmouseout=javascript:HideTooltip(); sys_asp /A nbsp; /TD TD CLASS=Hide 'sys_asp' is variable link...it is user defined.. please help its very urgent Regards Shalini Gupta On 5/22/07, Željko Filipin [EMAIL PROTECTED] wrote: On 5/22/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: I tried to this with href but its not working. Hi Shalini, What error message do you get when you use href? Can you post your Watir and Ruby code? There is lot of ways you can click a link. I recommend id. Jeff has made page at Watir wiki about it. See http://wiki.openqa.org/display/WTR/Methods+supported+by+Element Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How click on save button in file download
Hi, I had also problems with it. I had to download autoitX3 tool. Because there is a tool which identifies the instances of buttons and without that actions did not work for me. autoit.WinWaitActive(Save As) (catching the popup) autoit.ControlClick(Save As, , [CLASS:Button;TEXT:Save;INSTANCE:2]) (pressing Save button) autoit = WIN32OLE.new('AutoItX3.Control') autoit.WinWaitActive(File) #window name File Download autoit.ControlClick(File,,[CLASS:Button;TEXT:Save;INSTANCE:2]) # first popup is shown autoit.WinWaitActive(Save As) autoit.Send(file_name) autoit.ControlClick(Save As, , [CLASS:Button;TEXT:Save;INSTANCE:2]) autoit.WinWaitActive(Download) autoit.ControlClick(Download, , [CLASS:Button;TEXT:Open;INSTANCE:2]) Hope this will helps Br, Sfistak ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Cannot click Cancel button in download file window
Hi Kui, I had also problems with that. I have installed the script AutoIT because it identifies instances of buttons. After that my script is working with popups. This is how it looks like autoit = WIN32OLE.new('AutoItX3.Control') autoit.WinWaitActive(File) #File Download window autoit.ControlClick(File,,[CLASS:Button;TEXT:Cancel;INSTANCE:3]) I found that when there is popup with title File Download then OK button is with instance = 1 Save button is with instace =2 Cancel button is with instance =3 Hope it will work for you Br, Sfistak ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir + Autoit + Save As
Hi, I had to use the AutoIT tool for identifing the INSTANCE of buttons. Then it worked for me: autoit = WIN32OLE.new('AutoItX3.Control') autoit.WinWaitActive(File) #File Download popup autoit.ControlClick(File,,[CLASS:Button;TEXT:Save;INSTANCE:2]) #clicking Save button autoit.WinWaitActive(Save As) #catching the Save As popup autoit.Send(file_name) #sending file name into window autoit.ControlClick(Save As, , [CLASS:Button;TEXT:Save;INSTANCE:2]) #clicking Save button autoit.WinWaitActive(Download) #catching Download popup autoit.ControlClick(Download, , [CLASS:Button;TEXT:Open;INSTANCE:2]) #opening the downloaded file Hope this will help Br, Sfistak ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: Watir::Exception::MissingWayOfFindingObjectException: :href is an unknown way of finding a link Which Watir version are you using? It should work with 1.5.1.1166. You can get it here. http://wiki.openqa.org/display/WTR/Development+Builds Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
im using watir 1.4.1 but also installed this watir-1.5.1.1127.gem On 5/23/07, Željko Filipin [EMAIL PROTECTED] wrote: On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: Watir::Exception::MissingWayOfFindingObjectException: :href is an unknown way of finding a link Which Watir version are you using? It should work with 1.5.1.1166. You can get it here. http://wiki.openqa.org/display/WTR/Development+Builds Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Why it is always failed?
On 5/23/07, Kui Zhang [EMAIL PROTECTED] wrote: Using the following assert statement, I always get failed result. This works for me (no exception raised). irb(main):007:0 assert(ie.contains_text(Welcome manager!)) = nil Maybe you are not identifying frame correctly. It would help if you posted your error message. Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: im using watir 1.4.1 but also installed this watir-1.5.1.1127.gem Paste this into command prompt. ruby -e 'require watir; puts Watir::IE::VERSION' What do you get? In any case, you should uninstall both versions of watir and install 1.5.1.1166. :) Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
i Have installed 1.5.1166 and problem is solved.. but when i change that link name...its not working.. is href also variable?? On 5/23/07, Željko Filipin [EMAIL PROTECTED] wrote: On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: im using watir 1.4.1 but also installed this watir-1.5.1.1127.gem Paste this into command prompt. ruby -e 'require watir; puts Watir::IE::VERSION' What do you get? In any case, you should uninstall both versions of watir and install 1.5.1.1166. :) Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] AutoIt -- Unable to actually click IE7 buttons
So, I'm running into a weird problem with AutoIt and IE7 file download buttons I want to click Save, but am having no love. I've tried a number of different approaches (see below) with no luck. The uncommented version is what has come closest to working in that it actually manages to switch the focus to the 'Save' item. (send(!s) manages to underline the 'S', etc., but not 'hit' the save.) Any thoughts as to what is happening? It is as if there is some black hole of an event sink swallowing my clicks/sent keys? Regards, Erik autoit.WinActivate (File Download) autoit.WinWaitActive (File Download) autoit.ControlFocus(File Download,, 4427) autoit.ControlClick(File Download, , 4427) #autoit.Send(!s) #autoit.ControlFocus(File Download,,Save) #autoit.ControlClick(File Download, Do you want to open or save this file?, Save) #autoit.ControlFocus(File Download, , [CLASS:Button;TEXT:Send;INSTANCE:2]) #autoit.ControlClick(File Download, , [CLASS:Button;TEXT:Send;INSTANCE:2]) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE
Hi, In my project i want to click a link that is variable.i.e user dependent.Butalways it comes after an image... so is there any way to click a link just next to an image. please help.Its very urgent Regards Shalini Gupta ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] AutoIt -- Unable to actually click IE7 buttons
I do not mean to be rude, but don't you think you will get a faster and better reply if you posted you question at AutoIt forum? I would like to help, but I have never used AutoIt (I know Watir uses it somewhere, but it is hidden from me). Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
my watir code is... def system_link $logger.log(## CAST_HOMEPAGE_05) $logger.log() $logger.log ## System link #\n $logger.log(Description-In Health Factor with lowest grade / System subsection, click System link ) #logs only to corelogger file $logger.log(Expected Output-Outline page displaying Focus on System systemX - part of CORPORATE - for snapshotX snapshot should be displayed ) $logger.log() $ie.link(:href,'http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3%27%29.click end HTML CODE IS:- TR ID=m1359 CLASS=RowLevel1Style TD CLASS=RowLevel1 A BORDER=0 CLASS=Image ONCLICK=javascript:toggleRows('m1360');toggleImageSource('img2','themes/default/images/open- menu.gif','themes/default/images/closed-menu.gif')IMG ID=img2 SRC='themes/default/images/closed-menu.gif' ALT= ALIGN=absmiddle//A A HREF= http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3; onmouseover=javascript:ShowTooltip('Access detailed quality and quantity assessment page for the selected component.'); onmouseout=javascript:HideTooltip(); sys_asp /A nbsp; /TD TD CLASS=Hide 2.77 nbsp; /TD TD CLASS=medium High Risk /TD TD CLASS=Hide 0 /TD TD CLASS=Value A IMG SRC=themes/default/images/EastwardBlueArrow.png ALT= / /A nbsp; /TD TD CLASS=Value A IMG SRC=http://localhost:8080/CASTAD/?filename=CAST64479.png; ALT= / /A nbsp; /TD /TR in this code sys_asp is variable link.i.e user dependent. i want to click this without depending on this name.. Regards shalini ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
This does not work? ie.link(:href, http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 ).click What happens? Do you get any error message? Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
in the html code you have given no link is having http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 in the href every link's href start with localhost:8080 are you sure you are using the same HTML? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
hi, after using regular expression im getting this error 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: in the html code you have given no link is having http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 in the href every link's href start with localhost:8080 are you sure you are using the same HTML? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
my watir code is:- def system_link $logger.log(## CAST_HOMEPAGE_05) $logger.log() $logger.log ## System link #\n $logger.log(Description-In Health Factor with lowest grade / System subsection, click System link ) #logs only to corelogger file $logger.log(Expected Output-Outline page displaying Focus on System systemX - part of CORPORATE - for snapshotX snapshot should be displayed ) $logger.log() #$ie.link(:href,' http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click $ie.link(:href,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click end error is 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObject Exception: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) regards shalini gupta On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, after using regular expression im getting this error 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: in the html code you have given no link is having http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 in the href every link's href start with localhost:8080 are you sure you are using the same HTML? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
Shalini, The code your have written works fine here at my end using the html you have sent .. provided the link having text ,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS is there in the page. However, when I change the text so someting that is not there in the page it is throwing same error as you are getting. It seems to me, you are looking for a link on a screen where its not present or there is some spelling mistake in the text you are searching. Regards, Prema. On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: my watir code is:- def system_link $logger.log(## CAST_HOMEPAGE_05) $logger.log() $logger.log ## System link #\n $logger.log(Description-In Health Factor with lowest grade / System subsection, click System link ) #logs only to corelogger file $logger.log(Expected Output-Outline page displaying Focus on System systemX - part of CORPORATE - for snapshotX snapshot should be displayed ) $logger.log() #$ie.link(:href,'http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click $ie.link(:href,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click end error is 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObject Exception: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) regards shalini gupta On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, after using regular expression im getting this error 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: in the html code you have given no link is having http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 in the href every link's href start with localhost:8080 are you sure you are using the same HTML? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to click variable link
One more thing '' has different meaning in regular expression, so try escaping it out like $ie.link(:href,/treeobject=3305\object=3305\frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click This could be the mistake... Regards, Prema On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: Shalini, The code your have written works fine here at my end using the html you have sent .. provided the link having text ,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS is there in the page. However, when I change the text so someting that is not there in the page it is throwing same error as you are getting. It seems to me, you are looking for a link on a screen where its not present or there is some spelling mistake in the text you are searching. Regards, Prema. On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: my watir code is:- def system_link $logger.log(## CAST_HOMEPAGE_05) $logger.log() $logger.log ## System link #\n $logger.log(Description-In Health Factor with lowest grade / System subsection, click System link ) #logs only to corelogger file $logger.log(Expected Output-Outline page displaying Focus on System systemX - part of CORPORATE - for snapshotX snapshot should be displayed ) $logger.log() #$ie.link(:href,' http://localhost:8080/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3').click $ie.link(:href,/treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS/).click end error is 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObject Exception: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) regards shalini gupta On 5/23/07, SHALINI GUPTA [EMAIL PROTECTED] wrote: hi, after using regular expression im getting this error 1) Error: test_ADGDashboard_Homepage(TC_CAST_ADGDashboard_Homepage): Watir::Exception::UnknownObjectException: Unable to locate object, using href and (?-mix:treeobject=46object=46frame=FRAME_PORTAL_TOP_LEVEL_DETAILS) On 5/23/07, Prema Arya [EMAIL PROTECTED] wrote: in the html code you have given no link is having http://172.16.59.105http://172.16.59.105/CASTAD/?treeobject=2object=2frame=FRAME_PORTAL_TOP_LEVEL_DETAILSsnapshot=3 in the href every link's href start with localhost:8080 are you sure you are using the same HTML? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya -- Prema Arya ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] handling multiple IE
On 5/23/07, Jungwhan Kim [EMAIL PROTECTED] wrote: any resource that I can look up? IE6 and IE7 Running on a Single Machine http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] handling multiple IE
Thanks for the info. Can I automate the testing with watir? I want to automate the testing process on IE 6 and IE7 sequencially. Is there any configuration file or watir script support this feature? Date: Wed, 23 May 2007 16:49:07 +0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [Wtr-general] handling multiple IEOn 5/23/07, Jungwhan Kim [EMAIL PROTECTED] wrote: any resource that I can look up? IE6 and IE7 Running on a Single Machinehttp://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx Zeljko _ Create the ultimate e-mail address book. Import your contacts to Windows Live Hotmail. www.windowslive-hotmail.com/learnmore/managemail2.html?locale=en-usocid=TXT_TAGLM_HMWL_reten_impcont_0507___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] handling multiple IE
Multiple IE http://tredosoft.com/Multiple_IE http://tredosoft.com/files/multi-ie/multiple-ie-setup.exe ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] handling multiple IE
Thanks for the info. But let's say that the default is IE 7. But how should I start the instance of IE6 in Watir? Watir starts an IE instance like this, ie = IE.new Is there any way to tell Watir to open a specific version of IE after multiple versions of IE is installed in a single machine? Thanks again. Date: Wed, 23 May 2007 11:09:37 -0500 From: [EMAIL PROTECTED] To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] handling multiple IE Multiple IE http://tredosoft.com/Multiple_IE http://tredosoft.com/files/multi-ie/multiple-ie-setup.exe ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _ Change is good. See what’s different about Windows Live Hotmail. www.windowslive-hotmail.com/learnmore/default.html?locale=en-usocid=TXT_TAGLM_HMWL_reten_changegood_0507___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Why it is always failed?
you need to 'load up' the assertions libraries the following shows you how C:\cygwinirb irb(main):001:0 require 'test/unit/assertions' = true irb(main):002:0 include Test::Unit::Assertions = Object irb(main):003:0 assert( true ) = nil irb(main):004:0 assert(false) Test::Unit::AssertionFailedError: false is not true. from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:359:in `_wrap_assertion' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:40:in `assert' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:354:in `_wrap_assertion' from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' from (irb):4 irb(main):005:0 - Original Message - From: Kui Zhang [EMAIL PROTECTED] Date: Wednesday, May 23, 2007 11:28 am Subject: Re: [Wtr-general] Why it is always failed? Hi Zeljko, Thank you the reply! I found one of your reply for the assertion in another email and that helped with my problem. Here is the code I had before and it always failed. begin assert(ie.frame(:name, top_frame).contains_text(ClaimCenter)) puts (Test Passed. Found folder 'ClaimCenter') rescue = e puts(TEST FAILED. Cannot find folder 'ClaimCenter') end I removed the rescure... and it works now: begin assert(ie.frame(:name, top_frame).contains_text(ClaimCenter)) puts (Test Passed. Found folder 'ClaimCenter') end Have one question for you. When using assert in irb, it gives me NoMethodError. I did require 'Watir', should I be able to use assert in this case? irb(main):006:0 assert(ie.contains_text('iGoogle')) NoMethodError: undefined method `assert' for #Object:0x28cfa30 Really appreciate your help! Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Why it is always failed?
Got it. Thanks Zeljko! Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How click on save button in file download
Hi, is there somthing specail to do for executed this coad..? i have install ruby watir 1.4 on my system...? but this coad does not execut. pl help.! On 23/05/07, Grzesiek [EMAIL PROTECTED] wrote: Hi, I had also problems with it. I had to download autoitX3 tool. Because there is a tool which identifies the instances of buttons and without that actions did not work for me. autoit.WinWaitActive(Save As) (catching the popup) autoit.ControlClick(Save As, , [CLASS:Button;TEXT:Save;INSTANCE:2]) (pressing Save button) autoit = WIN32OLE.new('AutoItX3.Control') autoit.WinWaitActive(File) #window name File Download autoit.ControlClick(File,,[CLASS:Button;TEXT:Save;INSTANCE:2]) # first popup is shown autoit.WinWaitActive(Save As) autoit.Send(file_name) autoit.ControlClick(Save As, , [CLASS:Button;TEXT:Save;INSTANCE:2]) autoit.WinWaitActive(Download) autoit.ControlClick(Download, , [CLASS:Button;TEXT:Open;INSTANCE:2]) Hope this will helps Br, Sfistak ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- With Thanks and Regards, Anand Vardhan Srivastava | GlobalLogic India The Leader in Global Product Development B34/1, Sector-59,Noida ,201301 Phone: +91. 4342000 x 4285 Cell Number : +919811228992 Disclaimer: http://www.globallogic.com/email_disclaimer.txt ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] global variable is not seen in test_ method
When I attempt to use the $ie global variable in a test _ method: class TC_Policies Test::Unit::TestCase require 'rubygems' gem 'watir' require 'watir' require 'utilities' require 'test/unit/testcase' require 'win32ole' require 'unittests/setup' #setup to run suite $ie = openCMGServer($cmgServerName) openPolicyExcelFile() login($ie, username,password) def test_Windows_Tool_Tip_Values assert_equal(true, policyDropDownPossibleValues($ie, 'windows')) end end I get the following error: 1) Error: test_Windows_Tool_Tip_Values(TC_Policies): WIN32OLERuntimeError: unknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1775:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1775:in `document' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1157:in `each_element' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1166:in `locate' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1123:in `locate_tagged_element' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:3201:in `locate' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:2412:in `assert_exists' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:3260:in `[]' ./utilities.rb:100:in `clickMenuItem' ./PolicyDropDownPossibleValues.rb:16:in `policyDropDownPossibleValues' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./CMG_tests/policy_test_ suite.rb:32:in `test_Windows_Tool_Tip_Values' However, if I use a local variable in my class, it runs fine: class TC_Policies Test::Unit::TestCase require 'rubygems' gem 'watir' require 'watir' require 'utilities' require 'test/unit/testcase' require 'win32ole' require 'unittests/setup' #setup to run suite @@ie = openCMGServer($cmgServerName) openPolicyExcelFile() login(@@ie, username,password) def test_Windows_Tool_Tip_Values assert_equal(true, policyDropDownPossibleValues(@@ie, 'windows')) end end Any idea what is going on here? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to clear cache from within watir script?
Thanks Bret for letting me know. I pretty much gave up on figuring this out plus I do not think it is necessary any longer for us. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Seg-faults with 4 ie windows (hello)
Hello, all. I recently started using WATIR to automate load testing for my company's application, and I'm running into some trouble when I try to run more than four client windows at the same time. Each window needs its own ie process, since it needs its own session variables, so I got the development gem and am using ie.new_process, which works well most of the time. But when I try to run with more than about four windows, I eventually get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-p rocess.rb:44: [BUG] Segmentation fault ruby 1.8.6 (2007-03-13) [i386-mswin32] Can anyone help me with this? I tried running multiple small sessions in multiple command windows but it didn't seem to help. This is also my first foray into the world of open-source mailing lists, so if I've made an etiquette violation, please forgive me. Thanks, Michael Sofaer ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seg-faults with 4 ie windows (hello)
Maybe you're running out of memory? Take a look at taskmanager, or see if you can run more browsers on a beefier machine. I know I've personally run about 80-90 browsers simultaneously on a single desktop some time ago, but they weren't holding any large amounts of test data. Just BTW, you'll never achieve reasonable loads with browser-based test tools. You should consider something like Grinder for generating load. On 5/23/07, Michael Sofaer [EMAIL PROTECTED] wrote: Hello, all. I recently started using WATIR to automate load testing for my company's application, and I'm running into some trouble when I try to run more than four client windows at the same time. Each window needs its own ie process, since it needs its own session variables, so I got the development gem and am using ie.new_process, which works well most of the time. But when I try to run with more than about four windows, I eventually get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-process.rb:44: [BUG] Segmentation fault ruby 1.8.6 (2007-03-13) [i386-mswin32] Can anyone help me with this? I tried running multiple small sessions in multiple command windows but it didn't seem to help. This is also my first foray into the world of open-source mailing lists, so if I've made an etiquette violation, please forgive me. Thanks, Michael Sofaer ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Accessing a web page when a server request for username/password appears?
I was not able to get this to work via Watir. I created a very small Autoit file which ran before the script. I used a batch file to execute both files. The Auotit code is below (just in case, someone else runs into the issue): Run(C:\Program Files\Internet Explorer\iexplore.exe) WinWaitActive(Blank Page - Windows Internet Explorer) Send(http://mytest_site;) Send({ENTER}) WinWaitActive(Title of mytest_site) Send({ENTER}) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Unable to a get a handle of secondary popup window
This is the scenario I am trying to use Watir for: 1. Click link within IE window 2. Standard Microsoft window opens - File Download (Window Title) - Click Save 3. Standard Microsoft window opens - Save As (Window Title) - Click Save 4. Standard Microsoft window opens - Download Complete (Window Title) - Click Close 5. Continue with script I am to get through Steps 1 2 via the following code (this was available within the forum): ie.link(:id, export_results_to_excel).click_no_wait() hwnd = ie.enabled_popup(15) if (hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd_1) popup.clickWindowsButton(File Download, Save, maxWaittime = 30) end It's moving through steps 3 4 where I'm struggling. On a side note, this product rocks! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Accessing a web page when a server request for username/password appears?
We don't have a more elegant way of dealing with Basic Authentication yet. Someday Watir might borrow some of the code from Net::HTTP to do this, but it won't be happening any time soon. If you search the archives, you'll find some discussion of me trying to hack Basic Auth into Watir's goto() method. I could get to the main page OK with automated Basic Auth credentials, but I couldn't fool IE into giving me access to links, frames, etc. On 5/23/07, Kevin Scott [EMAIL PROTECTED] wrote: I was not able to get this to work via Watir. I created a very small Autoit file which ran before the script. I used a batch file to execute both files. The Auotit code is below (just in case, someone else runs into the issue): Run(C:\Program Files\Internet Explorer\iexplore.exe) WinWaitActive(Blank Page - Windows Internet Explorer) Send(http://mytest_site;) Send({ENTER}) WinWaitActive(Title of mytest_site) Send({ENTER}) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to clear cache from within watir script?
Give the script from this page a try: http://rubyforge.org/snippet/detail.php?type=snippetid=26 For a quick demo just copy/paste the whole thing into a file, name it del_cache.rb, and run it. It always worked fine for me on XP SP2. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seg-faults with 4 ie windows (hello)
Thanks, Chris I don't think that it's the machine running out of memory, 8 windows is taking about 150 MB of the 270 MB I have available before I get the seg fault. Closing additional expensive processes doesn't improve the number of windows I can run. Could I be running into a memory limit inside Ruby or Watir? Thanks for the recommendation for Grinder, I will look into that, although the app is pretty back-end intensive per user, so I hope to be OK for a bit with Watir. -Original Message- From: Chris McMahon [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 2:24 PM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Seg-faults with 4 ie windows (hello) Maybe you're running out of memory? Take a look at taskmanager, or see if you can run more browsers on a beefier machine. I know I've personally run about 80-90 browsers simultaneously on a single desktop some time ago, but they weren't holding any large amounts of test data. Just BTW, you'll never achieve reasonable loads with browser-based test tools. You should consider something like Grinder for generating load. On 5/23/07, Michael Sofaer [EMAIL PROTECTED] wrote: Hello, all. I recently started using WATIR to automate load testing for my company's application, and I'm running into some trouble when I try to run more than four client windows at the same time. Each window needs its own ie process, since it needs its own session variables, so I got the development gem and am using ie.new_process, which works well most of the time. But when I try to run with more than about four windows, I eventually get this error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1166/./watir/contrib/ie-new-p rocess.rb:44: [BUG] Segmentation fault ruby 1.8.6 (2007-03-13) [i386-mswin32] Can anyone help me with this? I tried running multiple small sessions in multiple command windows but it didn't seem to help. This is also my first foray into the world of open-source mailing lists, so if I've made an etiquette violation, please forgive me. Thanks, Michael Sofaer ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to a get a handle of secondary popup window
There have been a lot of posts in the past day on the File Download dialog using AutoIt, take a look at the archives: http://www.mail-archive.com/wtr-general%40rubyforge.org/ As far as step 4, I'd suggest turning it off in IE. Internet Options Advanced Notify when downloads complete. I haven't had the need to do file downloads, so I haven't mucked around with it. -Charley On 5/23/07, Kevin Scott [EMAIL PROTECTED] wrote: This is the scenario I am trying to use Watir for: 1. Click link within IE window 2. Standard Microsoft window opens - File Download (Window Title) - Click Save 3. Standard Microsoft window opens - Save As (Window Title) - Click Save 4. Standard Microsoft window opens - Download Complete (Window Title) - Click Close 5. Continue with script I am to get through Steps 1 2 via the following code (this was available within the forum): ie.link(:id, export_results_to_excel).click_no_wait() hwnd = ie.enabled_popup(15) if (hwnd) popup = WinClicker.new popup.makeWindowActive(hwnd_1) popup.clickWindowsButton(File Download, Save, maxWaittime = 30) end It's moving through steps 3 4 where I'm struggling. On a side note, this product rocks! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] ie-new-process and rubyw.exe? bug?
Using ruby 1.8.5 and watir 1.5.1.1164. When I use the following code the script stops after opening the browser and doesn't set the text field and move on with the script, can't figure out why!: === require 'watir' require 'watir/contrib/ie-new-process' $ie = Watir::IE.new_process $ie.logger.level = Logger::ERROR $ie.goto('www.google.com') $ie.text_field(:name, q).set(test) === If I use ruby.exe instead of rubyw.exe it works fine! A) Do I need a different version of Ruby? B) Does ie-new-process simply not support rubyw.exe (BUG)? If anyone can help it would be appreciated! Thanks in advance! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Seg-faults with 4 ie windows (hello)
Chris McMahon wrote: Maybe try using threads instead of ie-new-process? Not really a good idea. If you want separate sessions you must use IE.new_process. Indeed, in trunk, i have changed the default IE.new method to actually use the IE.new_process implementation because it behaves more reliably and better matches tester/user expectations. Chris might be thinking of Perl threads, which are native, and can accomplish things that Ruby threads (which are green) cannot. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] handling multiple IE
Jungwhan Kim wrote: Thanks for the info. But let's say that the default is IE 7. But how should I start the instance of IE6 in Watir? Watir starts an IE instance like this, ie = IE.new Is there any way to tell Watir to open a specific version of IE after multiple versions of IE is installed in a single machine? Look at IE.new_process in watir/contrib/ie-new-process.rb. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] ie-new-process and rubyw.exe? bug?
Norm wrote: Using ruby 1.8.5 and watir 1.5.1.1164. When I use the following code the script stops after opening the browser and doesn't set the text field and move on with the script, can't figure out why!: === require 'watir' require 'watir/contrib/ie-new-process' $ie = Watir::IE.new_process $ie.logger.level = Logger::ERROR $ie.goto('www.google.com') $ie.text_field(:name, q).set(test) === If I use ruby.exe instead of rubyw.exe it works fine! This works fine for me using rubyw.exe, ruby 1.8.5 and the trunk version of watir. Would it be possible for you to narrow down the problem a bit more? ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to clear cache from within watir script?
Bill Agee wrote: Give the script from this page a try: http://rubyforge.org/snippet/detail.php?type=snippetid=26 For a quick demo just copy/paste the whole thing into a file, name it del_cache.rb, and run it. It always worked fine for me on XP SP2. Thanks for the tip! ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE
SHALINI GUPTA wrote: In my project i want to click a link that is variable.i.e user dependent.But always it comes after an image... so is there any way to click a link just next to an image. please help.Its very urgent There is an little known feature in 1.5 that supports this: ie.link(:after, ie.image(:id, 'foo')).click Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general