[wtr-general] Re: ie.text.include?
I do use irb in conjunction with SciTE. I ran the command you included below for all six frames, but in each case the result came back false. For example: ie.frame(:id,"PrintFramectl140").text.include? "FIND THIS TEXT" On Jan 27, 2:04 pm, "Mark Anderson" wrote: > > Thanks, Mark and Michael. I'm glad to have the frame handle business > > explained. Unfortunately, the text is still not being found at either > > the frame level or the browser level. > > > If I look for text (using xx.text.include?) at the browser level, > > should I expect it to be found regardless of the presence of other > > structures, like frames or tables? In other words, if the text is > > present inside of a frame, should I have to search using the frame > > handle or should a browser level search find the text as well? > > If the text is present inside of a frame, you will need to search using the > frame handle. And if there are nested frames, you will have to dig down to > the correct level. > > Are you aware of irb? I use it a lot when writing my tests. It is the > interactive ruby browser. Here is a quick example of how I used it to > confirm the answer to your question: > > C:\Documents and Settings\manderson>irb > irb(main):001:0> require 'Watir' > => true > irb(main):002:0> ie = Watir::IE.new > => # > [This brings up my IE browser] > [Then I can navigate manually to the page I'm working with] > > irb(main):003:0> ie.text.include? "admin page" > => false > irb(main):004:0> ie.show_frames > there are 2 frames > frame index: 1 name: menuFrame > frame index: 2 name: bottomFrame > => 0..1 > irb(main):005:0> ie.frame(:name, "bottomFrame").text.include? "admin page" > => true > > __ Information from ESET NOD32 Antivirus, version of virus signature > database 3804 (20090127) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ie.text.include?
Oh, yes, I'm aware of irb. I use it in combination with SciTE. In fact, I used it to go through the six frames as you suggested below, but they all returned 'false': ie.frame(:name,"ctl140_ctl00_ctl03_ctl01").text.include? 'FIND THIS TEXT' and 5 other searches by frame returned 'false'. On Jan 27, 2:04 pm, "Mark Anderson" wrote: > > Thanks, Mark and Michael. I'm glad to have the frame handle business > > explained. Unfortunately, the text is still not being found at either > > the frame level or the browser level. > > > If I look for text (using xx.text.include?) at the browser level, > > should I expect it to be found regardless of the presence of other > > structures, like frames or tables? In other words, if the text is > > present inside of a frame, should I have to search using the frame > > handle or should a browser level search find the text as well? > > If the text is present inside of a frame, you will need to search using the > frame handle. And if there are nested frames, you will have to dig down to > the correct level. > > Are you aware of irb? I use it a lot when writing my tests. It is the > interactive ruby browser. Here is a quick example of how I used it to > confirm the answer to your question: > > C:\Documents and Settings\manderson>irb > irb(main):001:0> require 'Watir' > => true > irb(main):002:0> ie = Watir::IE.new > => # > [This brings up my IE browser] > [Then I can navigate manually to the page I'm working with] > > irb(main):003:0> ie.text.include? "admin page" > => false > irb(main):004:0> ie.show_frames > there are 2 frames > frame index: 1 name: menuFrame > frame index: 2 name: bottomFrame > => 0..1 > irb(main):005:0> ie.frame(:name, "bottomFrame").text.include? "admin page" > => true > > __ Information from ESET NOD32 Antivirus, version of virus signature > database 3804 (20090127) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Integration with Rally
Hi Richard 2009/1/27 Richard Lawrence : > > A Cucumber editor is one of the things on my list of projects. I could > see that making Cucumber + Watir an easy sell for customer acceptance > tests. Not sure when I'll actually start on it, though. > > Richard I understand that you can use Cucumber with Writeboards and there may be a TextMate bundle and a VIM plug-in. Do you want to collaborate on a Watir Cucumber wiki? Aidy --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Forcing mouse pointer into browser window
Using focus did not help either but I found a way to do it using AutoIt. require 'win32ole' z=WIN32OLE.new("AutoItX3.Control") z.mousemove(500,500) For now I am using set values while I figure out how to get them using AutoIt. On Jan 27, 2:14 pm, Tiffany Fodor wrote: > Hmmm, I've never seen a problem like that. > > Does setting the focus on your link help? > > $browser.link(:href, url).focus > > -Tiffany > > On Jan 27, 2:51 pm, JesseQA wrote: > > > Hi Tiffany, > > > Thanks for the reply. > > > The mouseover is a javascript event. > > Here is what I am using now: > > > $browser.link(:href, url).fireEvent("onMouseOver") > > > When using the IE developer toolbar the only attributes I see for each > > the link are: > > href which has the url as the value and test_com with a value of > > [object Object]. test_com is what gets added by my js. > > > If my mouse is anywhere inside the browser it works fine but if it is > > not then the events will not fire. > > > Here is what the html looks like: > > > > > > > testq > > > > > > http://www.mytesturl.com";>testurl > > http://www.mytesturl2.com";>testurl2 > > http://www.mytesturl3.com";>testurl3 > > > > > > > > > > On Jan 27, 12:14 pm, Tiffany Fodor wrote: > > > > Hi Jesse! > > > > Is the event associated with the mouseover a javascript event? If so, > > > you should be able to see the event details with IE Developer Toolbar > > > and then your code should look something like this: > > > > ie.text_field(:name, 'TextFieldName').fireEvent('EventName') > > > > Hope this helps! > > > > -Tiffany > > > > On Jan 27, 12:03 pm, JesseQA wrote: > > > > > Is there a way to force the mouse pointer into the browser window that > > > > was opened with watir? I need to fire some events on mouseover. If the > > > > pointer is not inside the browser window the events do not seem to > > > > fire. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Forcing mouse pointer into browser window
Hmmm, I've never seen a problem like that. Does setting the focus on your link help? $browser.link(:href, url).focus -Tiffany On Jan 27, 2:51 pm, JesseQA wrote: > Hi Tiffany, > > Thanks for the reply. > > The mouseover is a javascript event. > Here is what I am using now: > > $browser.link(:href, url).fireEvent("onMouseOver") > > When using the IE developer toolbar the only attributes I see for each > the link are: > href which has the url as the value and test_com with a value of > [object Object]. test_com is what gets added by my js. > > If my mouse is anywhere inside the browser it works fine but if it is > not then the events will not fire. > > Here is what the html looks like: > > > > testq > > > http://www.mytesturl.com";>testurl > http://www.mytesturl2.com";>testurl2 > http://www.mytesturl3.com";>testurl3 > > > > > > On Jan 27, 12:14 pm, Tiffany Fodor wrote: > > > Hi Jesse! > > > Is the event associated with the mouseover a javascript event? If so, > > you should be able to see the event details with IE Developer Toolbar > > and then your code should look something like this: > > > ie.text_field(:name, 'TextFieldName').fireEvent('EventName') > > > Hope this helps! > > > -Tiffany > > > On Jan 27, 12:03 pm, JesseQA wrote: > > > > Is there a way to force the mouse pointer into the browser window that > > > was opened with watir? I need to fire some events on mouseover. If the > > > pointer is not inside the browser window the events do not seem to > > > fire. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Forcing mouse pointer into browser window
Hi Tiffany, Thanks for the reply. The mouseover is a javascript event. Here is what I am using now: $browser.link(:href, url).fireEvent("onMouseOver") When using the IE developer toolbar the only attributes I see for each the link are: href which has the url as the value and test_com with a value of [object Object]. test_com is what gets added by my js. If my mouse is anywhere inside the browser it works fine but if it is not then the events will not fire. Here is what the html looks like: testq http://www.mytesturl.com";>testurl http://www.mytesturl2.com";>testurl2 http://www.mytesturl3.com";>testurl3 On Jan 27, 12:14 pm, Tiffany Fodor wrote: > Hi Jesse! > > Is the event associated with the mouseover a javascript event? If so, > you should be able to see the event details with IE Developer Toolbar > and then your code should look something like this: > > ie.text_field(:name, 'TextFieldName').fireEvent('EventName') > > Hope this helps! > > -Tiffany > > On Jan 27, 12:03 pm, JesseQA wrote: > > > Is there a way to force the mouse pointer into the browser window that > > was opened with watir? I need to fire some events on mouseover. If the > > pointer is not inside the browser window the events do not seem to > > fire. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Need help with verifying if text exists!
Thank you. Margam On Tue, Jan 27, 2009 at 12:48 PM, Tiffany Fodor wrote: > > Yep, you've got it right. > > In it's default form, you can't specify a success message for the > verify method. If you really needed to, however, you could extend the > method to do this. > > -Tiffany > > On Jan 27, 1:36 pm, Karthikeyan Margam wrote: > > Hi Tiffany, > > Thank you for the quick reply. This definitely helps me. > > > > So if I understand this correctly, the verify() method always has the > > failmessage as the default message. Is my understanding correct? > > > > Thank you. > > Margam > > > > On Tue, Jan 27, 2009 at 12:18 PM, Tiffany Fodor > wrote: > > > > > Hi Margam! > > > > > You could separate your checks into two different tasks: > > > > > def verify_text(searchedtext,passmessage,failmessage) > > > verify($ie.text.inclue?(searchedtext), message=failmessage) > > >if $ie.text.include?(searchedtext) > > > puts passmessage > > >else > > >puts failmessage > > >end > > > end > > > > > Hope this helps! > > > > > -Tiffany > > > > > On Jan 27, 12:16 pm, Margam wrote: > > > > HI all, > > > > I am trying to verify if particular text is present in the page using > > > > verify method. And also output corresponding "passmessage" and > > > > "failmessage". This is the code snippet I am using: > > > > - > > > > def verify_text(searchedtext,passmessage,failmessage) > > > > if verify($ie.text.include?(searchedtext))==true > > > > puts passmessage > > > > else > > > > puts failmessage > > > > end > > > > end > > > > --- > > > > > > Note: all arguments for this function are passed from the main > script. > > > > > > The problem I am facing is, even if the "verify" passes, only the > > > > "failmessage" is output. The "passmessage" is never output. > > > > > > The reason I want to use "verify" instead of a simple > > > > "$ie.text.inclue?" is, so that not only the failmessage is output but > > > > also a failure is raised. > > > > > > Hope I am clear. > > > > Can someone tell me what the problem is? > > > > Thank you > > > > > > Margam > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Need help with verifying if text exists!
Yep, you've got it right. In it's default form, you can't specify a success message for the verify method. If you really needed to, however, you could extend the method to do this. -Tiffany On Jan 27, 1:36 pm, Karthikeyan Margam wrote: > Hi Tiffany, > Thank you for the quick reply. This definitely helps me. > > So if I understand this correctly, the verify() method always has the > failmessage as the default message. Is my understanding correct? > > Thank you. > Margam > > On Tue, Jan 27, 2009 at 12:18 PM, Tiffany Fodor wrote: > > > Hi Margam! > > > You could separate your checks into two different tasks: > > > def verify_text(searchedtext,passmessage,failmessage) > > verify($ie.text.inclue?(searchedtext), message=failmessage) > > if $ie.text.include?(searchedtext) > > puts passmessage > > else > > puts failmessage > > end > > end > > > Hope this helps! > > > -Tiffany > > > On Jan 27, 12:16 pm, Margam wrote: > > > HI all, > > > I am trying to verify if particular text is present in the page using > > > verify method. And also output corresponding "passmessage" and > > > "failmessage". This is the code snippet I am using: > > > - > > > def verify_text(searchedtext,passmessage,failmessage) > > > if verify($ie.text.include?(searchedtext))==true > > > puts passmessage > > > else > > > puts failmessage > > > end > > > end > > > --- > > > > Note: all arguments for this function are passed from the main script. > > > > The problem I am facing is, even if the "verify" passes, only the > > > "failmessage" is output. The "passmessage" is never output. > > > > The reason I want to use "verify" instead of a simple > > > "$ie.text.inclue?" is, so that not only the failmessage is output but > > > also a failure is raised. > > > > Hope I am clear. > > > Can someone tell me what the problem is? > > > Thank you > > > > Margam --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Need help with verifying if text exists!
Hi Tiffany, Thank you for the quick reply. This definitely helps me. So if I understand this correctly, the verify() method always has the failmessage as the default message. Is my understanding correct? Thank you. Margam On Tue, Jan 27, 2009 at 12:18 PM, Tiffany Fodor wrote: > > Hi Margam! > > You could separate your checks into two different tasks: > > def verify_text(searchedtext,passmessage,failmessage) > verify($ie.text.inclue?(searchedtext), message=failmessage) >if $ie.text.include?(searchedtext) > puts passmessage >else >puts failmessage >end > end > > Hope this helps! > > -Tiffany > > On Jan 27, 12:16 pm, Margam wrote: > > HI all, > > I am trying to verify if particular text is present in the page using > > verify method. And also output corresponding "passmessage" and > > "failmessage". This is the code snippet I am using: > > - > > def verify_text(searchedtext,passmessage,failmessage) > > if verify($ie.text.include?(searchedtext))==true > > puts passmessage > > else > > puts failmessage > > end > > end > > --- > > > > Note: all arguments for this function are passed from the main script. > > > > The problem I am facing is, even if the "verify" passes, only the > > "failmessage" is output. The "passmessage" is never output. > > > > The reason I want to use "verify" instead of a simple > > "$ie.text.inclue?" is, so that not only the failmessage is output but > > also a failure is raised. > > > > Hope I am clear. > > Can someone tell me what the problem is? > > Thank you > > > > Margam > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Integration with Rally
A Cucumber editor is one of the things on my list of projects. I could see that making Cucumber + Watir an easy sell for customer acceptance tests. Not sure when I'll actually start on it, though. Richard On Mon, Jan 26, 2009 at 2:58 PM, Pete Dignan wrote: > > This message may be of interest to anyone using Rally http://www.rallydev.com > to manage their agile process. > > I met on 1/20 with three folks from Rally: CTO Ryan Martens, Zach Nies > (VP of Product Development) and Bob Cotton (http://awta.wikispaces.com/ > Bob+Cotton) to talk about Watir and Rally. > > They would like to see all agile teams using their product, so the > more testing tools that have hooks into Rally, the better is for > them. But they do not have any test tool integration plans on their > own development road map this year. > > They would be very happy if someone were to create a "connector" (see > http://www.rallydev.com/products/integrations/) to Rally for the Watir > framework, probably using the Rally Integrations Toolkit for Ruby > (which "jump-starts developer productivity and efficiency through a > set of Ruby tools that easily interact with the data in your Rally > subscription via the REST Web Services API"). They see the test flow > as authoring (in Rally) -> execution (in Watir) -> results reporting > (back to Rally). > > They also talked about wanting to see a "rich Cucumber authoring > environment" (essentially an IDE) in Rally, but they don't have any > plans to create that yet. They are excited about Cucumber as a way to > express tests. I asked why; their answer: the tests expressed in > Cucumber act as documentation of features and tests that can be easily > understood by business owners. This is just an aside since many of > you know the new Watir framework includes support for Cucumber. > > We don't have enough bandwidth inside WatirCraft to work on any of > this anytime soon. I don't know if there is anyone out there in Watir- > world who might be interested in leading a Watir-Rally integration > effort (or open sourcing one you've already done), but thought I'd > throw it out there. > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Need help with verifying if text exists!
Hi Margam! You could separate your checks into two different tasks: def verify_text(searchedtext,passmessage,failmessage) verify($ie.text.inclue?(searchedtext), message=failmessage) if $ie.text.include?(searchedtext) puts passmessage else puts failmessage end end Hope this helps! -Tiffany On Jan 27, 12:16 pm, Margam wrote: > HI all, > I am trying to verify if particular text is present in the page using > verify method. And also output corresponding "passmessage" and > "failmessage". This is the code snippet I am using: > - > def verify_text(searchedtext,passmessage,failmessage) > if verify($ie.text.include?(searchedtext))==true > puts passmessage > else > puts failmessage > end > end > --- > > Note: all arguments for this function are passed from the main script. > > The problem I am facing is, even if the "verify" passes, only the > "failmessage" is output. The "passmessage" is never output. > > The reason I want to use "verify" instead of a simple > "$ie.text.inclue?" is, so that not only the failmessage is output but > also a failure is raised. > > Hope I am clear. > Can someone tell me what the problem is? > Thank you > > Margam --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Forcing mouse pointer into browser window
Hi Jesse! Is the event associated with the mouseover a javascript event? If so, you should be able to see the event details with IE Developer Toolbar and then your code should look something like this: ie.text_field(:name, 'TextFieldName').fireEvent('EventName') Hope this helps! -Tiffany On Jan 27, 12:03 pm, JesseQA wrote: > Is there a way to force the mouse pointer into the browser window that > was opened with watir? I need to fire some events on mouseover. If the > pointer is not inside the browser window the events do not seem to > fire. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ie.text.include?
> Thanks, Mark and Michael. I'm glad to have the frame handle business > explained. Unfortunately, the text is still not being found at either > the frame level or the browser level. > > If I look for text (using xx.text.include?) at the browser level, > should I expect it to be found regardless of the presence of other > structures, like frames or tables? In other words, if the text is > present inside of a frame, should I have to search using the frame > handle or should a browser level search find the text as well? If the text is present inside of a frame, you will need to search using the frame handle. And if there are nested frames, you will have to dig down to the correct level. Are you aware of irb? I use it a lot when writing my tests. It is the interactive ruby browser. Here is a quick example of how I used it to confirm the answer to your question: C:\Documents and Settings\manderson>irb irb(main):001:0> require 'Watir' => true irb(main):002:0> ie = Watir::IE.new => # ie.text.include? "admin page" => false irb(main):004:0> ie.show_frames there are 2 frames frame index: 1 name: menuFrame frame index: 2 name: bottomFrame => 0..1 irb(main):005:0> ie.frame(:name, "bottomFrame").text.include? "admin page" => true __ Information from ESET NOD32 Antivirus, version of virus signature database 3804 (20090127) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ie.text.include?
Thanks, Mark and Michael. I'm glad to have the frame handle business explained. Unfortunately, the text is still not being found at either the frame level or the browser level. If I look for text (using xx.text.include?) at the browser level, should I expect it to be found regardless of the presence of other structures, like frames or tables? In other words, if the text is present inside of a frame, should I have to search using the frame handle or should a browser level search find the text as well? On Jan 27, 12:24 pm, "Mark Anderson" wrote: > > I was trying this just as a debug step because an 'ie.text.include?' > > is not finding the text that I want it to. There are six frames in > > the page and I was trying to verify that the focus was on the one that > > contained the text... > > > What I want Watir to find is FIND THIS TEXT in the following HTML > > code. > > > > style="background-color:Beige;">C7654321 > DIV> > class="r11">29153207 > style="background-color:Beige;">John Q Public > TD> > class="r11">09/13/200809/17/2008 > style="background-color:Beige;">FIND THIS TEXT > TD> > class="r11">811009/17/2008 > style="background-color:Beige;">Re-Open > class="a35" style="background-color:Beige;">Santa Fe > DIV> > > > The following Watir code says it isn't found: > > > ie.frame(:name,"NameOfFrame") > > if ie.text.include? 'FIND THIS TEXT' > > puts " FIND THIS TEXT Found" > > else > > puts " FIND THIS TEXT Not Found" > > end > > > I'm trying this for each of the six frames. I don't know if the > > ie.frame command should be necessary or not (or even if it's actually > > bringing focus to the frame). > > I think the code you are looking for is: > > if ie.frame(:name, "NameOfFrame").text.include? 'FIND THIS TEXT' > puts " FIND THIS TEXT Found" > else > puts " FIND THIS TEXT Not Found" > end > > When you are calling ie.frame(:name,"NameOfFrame"), it is returning a handle > to the frame, but you aren't using that handle. You are going back to the > browser level to look at text, so you are looking in the same place 6 times. > If you wanted to use the handle you are getting you could use: > > name_of_frame = ie.frame(:name,"NameOfFrame") > if name_of_frame.text.include? 'FIND THIS TEXT' > puts " FIND THIS TEXT Found" > else > puts " FIND THIS TEXT Not Found" > end > > __ Information from ESET NOD32 Antivirus, version of virus signature > database 3804 (20090127) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com- 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 -~--~~~~--~~--~--~---
[wtr-general] Need help with verifying if text exists!
HI all, I am trying to verify if particular text is present in the page using verify method. And also output corresponding "passmessage" and "failmessage". This is the code snippet I am using: - def verify_text(searchedtext,passmessage,failmessage) if verify($ie.text.include?(searchedtext))==true puts passmessage else puts failmessage end end --- Note: all arguments for this function are passed from the main script. The problem I am facing is, even if the "verify" passes, only the "failmessage" is output. The "passmessage" is never output. The reason I want to use "verify" instead of a simple "$ie.text.inclue?" is, so that not only the failmessage is output but also a failure is raised. Hope I am clear. Can someone tell me what the problem is? Thank you Margam --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Ineract with java pop-up window
Is it "showModalDialog"? mag7417 wrote: > Hi! > > I have devoured as much information as possible all over the Internet > the past few days dealing with my problem. I see people talk about > Watir and Java but nothing related to my problem. > > I am trying to access a website (actual code except the address) > >irb >require "watir" ># Open a Watir window (Internet Explorer) >ie = Watir::IE.new >ie.goto "http://xxx.yyy.com/login.aspx > > What that address actually does is to open a new window. It includes: > >href="javascript:showZ() > > What I am trying to figure out is how to interact with this new window > lacking menu bars etc. Is there a reasonably easy way to do this or is > there inforrmaion out there that I can put my teeth into? > > > Thanks in advance for any help, > > Magnus Thernelius > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Forcing mouse pointer into browser window
Is there a way to force the mouse pointer into the browser window that was opened with watir? I need to fire some events on mouseover. If the pointer is not inside the browser window the events do not seem to fire. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ie.text.include?
> I was trying this just as a debug step because an 'ie.text.include?' > is not finding the text that I want it to. There are six frames in > the page and I was trying to verify that the focus was on the one that > contained the text... > > What I want Watir to find is FIND THIS TEXT in the following HTML > code. > > style="background-color:Beige;">C7654321 DIV> class="r11">29153207style="background-color:Beige;">John Q Public TD> class="r11">09/13/200809/17/2008 style="background-color:Beige;">FIND THIS TEXT TD> class="r11">811009/17/2008 style="background-color:Beige;">Re-Open class="a35" style="background-color:Beige;">Santa Fe DIV> > > The following Watir code says it isn't found: > > ie.frame(:name,"NameOfFrame") > if ie.text.include? 'FIND THIS TEXT' > puts "FIND THIS TEXT Found" > else > puts "FIND THIS TEXT Not Found" > end > > I'm trying this for each of the six frames. I don't know if the > ie.frame command should be necessary or not (or even if it's actually > bringing focus to the frame). I think the code you are looking for is: if ie.frame(:name, "NameOfFrame").text.include? 'FIND THIS TEXT' puts "FIND THIS TEXT Found" else puts "FIND THIS TEXT Not Found" end When you are calling ie.frame(:name,"NameOfFrame"), it is returning a handle to the frame, but you aren't using that handle. You are going back to the browser level to look at text, so you are looking in the same place 6 times. If you wanted to use the handle you are getting you could use: name_of_frame = ie.frame(:name,"NameOfFrame") if name_of_frame.text.include? 'FIND THIS TEXT' puts "FIND THIS TEXT Found" else puts "FIND THIS TEXT Not Found" end __ Information from ESET NOD32 Antivirus, version of virus signature database 3804 (20090127) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ActiveSupport error connecting to IE window
Thanks, Charlie. Figured as much. I just happened to notice the difference in IRB today. We've long since stripped the "include" line out of our scripts, so we're okay there. Cheers! Paul C. On Jan 27, 12:56 pm, Charley Baker wrote: > This should help clarify the > confusion:http://wiki.openqa.org/display/WTR/include+Watir > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: ActiveSupport error connecting to IE window
This should help clarify the confusion: http://wiki.openqa.org/display/WTR/include+Watir Charley Baker blog: http://charleybakersblog.blogspot.com/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Tue, Jan 27, 2009 at 10:37 AM, Paul wrote: > > Hi there! Long time no type. I've been using Watir for some time now > and only just recently upgraded to version 1.6.2. > > I noticed an error today that I haven't seen before. It's annoying. > Here are the details: > > (0) System: WinXP Pro SP2 with IE 6 installed. >- open IE and go to: http://sympatico.msn.ca/ >- (I just want to connect to the IE window from the IRB session) > > (1) From a command prompt in Windows, type irb > (2) within irb, type the following: > - > irb(main):001:0> require 'watir' > => true > irb(main):002:0> include Watir > => Object > irb(main):003:0> ie = IE.attach( :title, /MSN/ ) > NameError: uninitialized constant ActiveSupport::Duration >from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/dependencies.rb:276:in `load_missing_constant' >from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/dependencies.rb:468:in `const_missing' >from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/core_ext/time/calculations.rb:246:in > `minus_without_coercion' >from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/core_ext/time/calculations.rb:258:in `-' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- > class.rb:506:in `wait' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- > class.rb:154:in `_attach_init' >from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- > class.rb:146:in `attach' >from (irb):3 > irb(main):004:0> > - > > --> I never used to get this error. > > If I run the following commands, it still fails: > - > require 'watir' > include Watir > ie = Watir::IE.attach :title, /MSN/ > => (get errors above) > - > > If I run the following commands, it works: > - > require 'watir' > ie = Watir::IE.attach :title, /MSN/ > - > > Thoughts? These ActiveSupport errors never happened with Watir 1.4.1 > or 1.5.x. > > Please let me know if this is a bug with 1.6.2. or some intentional > logic change in how Watir methods are called. > > > Thanks. Paul. > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] ie.text.include?
Mark, I see you are correct. Frame does not have a flash method. I was trying this just as a debug step because an 'ie.text.include?' is not finding the text that I want it to. There are six frames in the page and I was trying to verify that the focus was on the one that contained the text... What I want Watir to find is FIND THIS TEXT in the following HTML code. C7654321 29153207 John Q Public09/13/200809/17/2008FIND THIS TEXT811009/17/2008Re-OpenSanta Fe The following Watir code says it isn't found: ie.frame(:name,"NameOfFrame") if ie.text.include? 'FIND THIS TEXT' puts "FIND THIS TEXT Found" else puts "FIND THIS TEXT Not Found" end I'm trying this for each of the six frames. I don't know if the ie.frame command should be necessary or not (or even if it's actually bringing focus to the frame). On Jan 27, 11:19 am, "Mark Anderson" wrote: > Last I looked Frame objects do not have a flash method. What are you > attempting to do - beyond make a frame flash? > > I generally only use the flash methods when I am working interactively with > irb. I have not found them to be useful in my test scripts. In working > interactively with frames, I can generally ask it to show me the text or > html and be able to determine that I have a handle to the correct frame. > > /\/\ark > > > > > > > -Original Message- > > From: watir-general@googlegroups.com [mailto:watir- > > gene...@googlegroups.com] On Behalf Of Monkeybuns > > Sent: Tuesday, January 27, 2009 11:04 AM > > To: Watir General > > Subject: [wtr-general] undefined method `flash' > > > I'm getting the following error when I try to call the 'flash' method: > > > NoMethodError: undefined method `flash' for # > 0x47d42dc> > > > My attempted call to 'flash' looks like this: > > > $browser = Watir::IE.new > > <...many intermediate $browser commands not included here...> > > $browser.frame(:name,"ctl140_ctl00_ctl03_ctl01").flash > > > I wonder if I'm not requiring/including something I should be. What I > > currently have is the following: > > > require 'rubygems' > > require 'watir' > > require 'test/unit/assertions' > > include Test::Unit::Assertions > > > Is there something else I should do so 'flash' will be defined? > > > __ Information from ESET NOD32 Antivirus, version of virus > > signature database 3804 (20090127) __ > > > The message was checked by ESET NOD32 Antivirus. > > >http://www.eset.com > > __ Information from ESET NOD32 Antivirus, version of virus signature > database 3804 (20090127) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com- 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Integration with Rally
Hey Pete! This sounds like a great idea! I'd love to take a look at this, but it will probably have to be in my spare time as my current client doesn't use Rally (maybe I could talk them into it if I could integrate my Watir tests into it). Also, doing a demo once an integration is done would be easy since I work next door to them. I'll try to take a look this week and determine if this is a project that I can help with. -Tiffany On Jan 26, 2:58 pm, Pete Dignan wrote: > This message may be of interest to anyone using Rallyhttp://www.rallydev.com > to manage their agile process. > > I met on 1/20 with three folks from Rally: CTO Ryan Martens, Zach Nies > (VP of Product Development) and Bob Cotton (http://awta.wikispaces.com/ > Bob+Cotton) to talk about Watir and Rally. > > They would like to see all agile teams using their product, so the > more testing tools that have hooks into Rally, the better is for > them. But they do not have any test tool integration plans on their > own development road map this year. > > They would be very happy if someone were to create a "connector" > (seehttp://www.rallydev.com/products/integrations/) to Rally for the Watir > framework, probably using the Rally Integrations Toolkit for Ruby > (which "jump-starts developer productivity and efficiency through a > set of Ruby tools that easily interact with the data in your Rally > subscription via the REST Web Services API"). They see the test flow > as authoring (in Rally) -> execution (in Watir) -> results reporting > (back to Rally). > > They also talked about wanting to see a "rich Cucumber authoring > environment" (essentially an IDE) in Rally, but they don't have any > plans to create that yet. They are excited about Cucumber as a way to > express tests. I asked why; their answer: the tests expressed in > Cucumber act as documentation of features and tests that can be easily > understood by business owners. This is just an aside since many of > you know the new Watir framework includes support for Cucumber. > > We don't have enough bandwidth inside WatirCraft to work on any of > this anytime soon. I don't know if there is anyone out there in Watir- > world who might be interested in leading a Watir-Rally integration > effort (or open sourcing one you've already done), but thought I'd > throw it out there. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] ActiveSupport error connecting to IE window
Hi there! Long time no type. I've been using Watir for some time now and only just recently upgraded to version 1.6.2. I noticed an error today that I haven't seen before. It's annoying. Here are the details: (0) System: WinXP Pro SP2 with IE 6 installed. - open IE and go to: http://sympatico.msn.ca/ - (I just want to connect to the IE window from the IRB session) (1) From a command prompt in Windows, type irb (2) within irb, type the following: - irb(main):001:0> require 'watir' => true irb(main):002:0> include Watir => Object irb(main):003:0> ie = IE.attach( :title, /MSN/ ) NameError: uninitialized constant ActiveSupport::Duration from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ active_support/dependencies.rb:276:in `load_missing_constant' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ active_support/dependencies.rb:468:in `const_missing' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ active_support/core_ext/time/calculations.rb:246:in `minus_without_coercion' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ active_support/core_ext/time/calculations.rb:258:in `-' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- class.rb:506:in `wait' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- class.rb:154:in `_attach_init' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie- class.rb:146:in `attach' from (irb):3 irb(main):004:0> - --> I never used to get this error. If I run the following commands, it still fails: - require 'watir' include Watir ie = Watir::IE.attach :title, /MSN/ => (get errors above) - If I run the following commands, it works: - require 'watir' ie = Watir::IE.attach :title, /MSN/ - Thoughts? These ActiveSupport errors never happened with Watir 1.4.1 or 1.5.x. Please let me know if this is a bug with 1.6.2. or some intentional logic change in how Watir methods are called. Thanks. Paul. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: undefined method `flash'
You cannot flash the frame or exists? check. But, you can use as follow. $browser.frame(:name,"ctl140_ctl00_ctl03_ctl01").text_field(:value,'FOO').flash - Original Message From: Monkeybuns To: Watir General Sent: Tuesday, January 27, 2009 9:04:14 AM Subject: [wtr-general] undefined method `flash' I'm getting the following error when I try to call the 'flash' method: NoMethodError: undefined method `flash' for # My attempted call to 'flash' looks like this: $browser = Watir::IE.new <...many intermediate $browser commands not included here...> $browser.frame(:name,"ctl140_ctl00_ctl03_ctl01").flash I wonder if I'm not requiring/including something I should be. What I currently have is the following: require 'rubygems' require 'watir' require 'test/unit/assertions' include Test::Unit::Assertions Is there something else I should do so 'flash' will be defined? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: undefined method `flash'
Last I looked Frame objects do not have a flash method. What are you attempting to do - beyond make a frame flash? I generally only use the flash methods when I am working interactively with irb. I have not found them to be useful in my test scripts. In working interactively with frames, I can generally ask it to show me the text or html and be able to determine that I have a handle to the correct frame. /\/\ark > -Original Message- > From: watir-general@googlegroups.com [mailto:watir- > gene...@googlegroups.com] On Behalf Of Monkeybuns > Sent: Tuesday, January 27, 2009 11:04 AM > To: Watir General > Subject: [wtr-general] undefined method `flash' > > > I'm getting the following error when I try to call the 'flash' method: > >NoMethodError: undefined method `flash' for # 0x47d42dc> > > My attempted call to 'flash' looks like this: > >$browser = Watir::IE.new ><...many intermediate $browser commands not included here...> >$browser.frame(:name,"ctl140_ctl00_ctl03_ctl01").flash > > I wonder if I'm not requiring/including something I should be. What I > currently have is the following: > >require 'rubygems' >require 'watir' >require 'test/unit/assertions' >include Test::Unit::Assertions > > Is there something else I should do so 'flash' will be defined? > > > > > __ Information from ESET NOD32 Antivirus, version of virus > signature database 3804 (20090127) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > __ Information from ESET NOD32 Antivirus, version of virus signature database 3804 (20090127) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Watir working on Vista
Please be more specific. Or, you can search 'vista' in previous messages. - Original Message From: Vicky To: Watir General Sent: Tuesday, January 27, 2009 2:07:42 AM Subject: [wtr-general] Watir working on Vista Hello friends, When i am trying to use watir on vista OS. Watir is not able to fetch elements. Can anyone help me by telling how to solve this problem. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] undefined method `flash'
I'm getting the following error when I try to call the 'flash' method: NoMethodError: undefined method `flash' for # My attempted call to 'flash' looks like this: $browser = Watir::IE.new <...many intermediate $browser commands not included here...> $browser.frame(:name,"ctl140_ctl00_ctl03_ctl01").flash I wonder if I'm not requiring/including something I should be. What I currently have is the following: require 'rubygems' require 'watir' require 'test/unit/assertions' include Test::Unit::Assertions Is there something else I should do so 'flash' will be defined? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Problem installing watir gem
It looks like you're probably behind a proxy. Try these instructions to set up your proxy before trying to install the gems: http://wiki.openqa.org/display/WTR/Installing+ruby+gems+from+behind+proxy+firewall Charley Baker blog: http://charleybakersblog.blogspot.com/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Tue, Jan 27, 2009 at 5:57 AM, malar wrote: > > hi, > > i follwed the steps given in this link. > > http://wiki.openqa.org/display/WTR/Install+Watir. > > i downloaded watir-1.6.1 and commonwatir-1.6.1 files inside a folder > in c drive. > > c:\watir>gem update --system > ERROR: while executing gem.. > Bad file descriptor - connect <2> > > c:\watir>gem install watir-1.6.1 > While executing gem > Error installing watir: > watir requires win32-process>=0.5.5 > > i downloaded this win32-prosee>=0.5.5 > but i don know whre to install this > > > thank u > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Testing using Fake IP
Natasha, Here is one way you may try. I have tested this on FC8 setup, however I am not sure about Windows. You can use IP address aliasing. Please refer to link below to know how to create IP aliases on Windows/Linux. http://www.webperformanceinc.com/support/suite/manual/multiple_ip_addresses.html You will need two such machines. One will run you web server and other will run your IE/FF browser. You can use following IPs for your server 192.168.1.1 (lets say this maps to US.com) 192.168.2.1 (this one to UK) . (and many more) . and client machine will have 192.168.1.2 192.168.2.2 192.168.3.2 and so on. You will have to configure your web server so that it should bind to all IP address that you have created using aliases. Please refer to your apache or ISS server document to figure that out. By default httpd binds to all IP addresses. Once you have done this your watir script should access the server using the different server IP that you have configured above. The very fact that you are using the server IP, your request will be generated so that the source IP will be corresponding to the aliased local IP. E.g. http://192.168.1.1/ should result in site being accessed from US where as http://192.168.2.1/ should result in site being access from UK. (You will have to make sure your mapping gets right with IP addresses you chose.) Hope this helps. Regards, Manish Natasha wrote: > Hi All, > > Just wanted to get technical suggestion. Its not related to Watir. But > in case this can be automated using Ruby/Watir, it would be great :) > > I need to test following scenario: > > If a user accesses a website from US, then the URL should transform to > us.test.com.If a user accesses it from UK, then the url should change > to uk.test.com. > This is based on source IP. So need a way to fake the source IP. > > Has anyone tested a similar scenario? If yes, how did you fake your > machine IP? > Here the testing needs to be done with internal URLs, hence we cannot > use Public Proxies. > > So is there a way in which I can configure my machine IP, without much > cost overheads, inorder to test it out. > > Thanks in advance, > Natasha Ranney > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Problem installing watir gem
hi, i follwed the steps given in this link. http://wiki.openqa.org/display/WTR/Install+Watir. i downloaded watir-1.6.1 and commonwatir-1.6.1 files inside a folder in c drive. c:\watir>gem update --system ERROR: while executing gem.. Bad file descriptor - connect <2> c:\watir>gem install watir-1.6.1 While executing gem Error installing watir: watir requires win32-process>=0.5.5 i downloaded this win32-prosee>=0.5.5 but i don know whre to install this thank u --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Testing using Fake IP
Hi All, Just wanted to get technical suggestion. Its not related to Watir. But in case this can be automated using Ruby/Watir, it would be great :) I need to test following scenario: If a user accesses a website from US, then the URL should transform to us.test.com.If a user accesses it from UK, then the url should change to uk.test.com. This is based on source IP. So need a way to fake the source IP. Has anyone tested a similar scenario? If yes, how did you fake your machine IP? Here the testing needs to be done with internal URLs, hence we cannot use Public Proxies. So is there a way in which I can configure my machine IP, without much cost overheads, inorder to test it out. Thanks in advance, Natasha Ranney --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Issue in generating result file(.xml file)
ci-reporter and is this the issue related to gem dependencies ? On Jan 27, 3:59 pm, Alister Scott wrote: > What library are you using to create the XML file? > > Regards, > Alister > > On Jan 27, 6:45 pm, basu wrote: > > > This behavior is random (some times it generates and some times it > > does not) > > > On Jan 27, 1:17 pm, basu wrote: > > > > Hi, > > > I am facing the issue after the test execution, > > > > C:\>ruby Preferences_Phase2.rb > > > Loaded suite Preferences_Phase2 > > > Started > > > . > > > Finished in 1801.094 seconds. > > > > 9 tests, 86 assertions, 0 failures, 0 errors > > > c:/ruby/lib/ruby/1.8/fileutils.rb:1255:in `copy': unknown file type: C: > > > \testpref\TEST-Preferences-Phase2 > > > .xml (RuntimeError) > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:451:in `copy_entry' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1324:in `traverse' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:448:in `copy_entry' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:423:in `cp_r' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1395:in > > > `fu_each_src_dest' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1411:in > > > `fu_each_src_dest0' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1393:in > > > `fu_each_src_dest' > > > from c:/ruby/lib/ruby/1.8/fileutils.rb:422:in `cp_r' > > > ... 11 levels... > > > from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' > > > from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' > > > from c:/ruby/lib/ruby/1.8/test/unit.rb:278 > > > from WinampClient_Preferences_Phase2.rb:741 > > > > All the tests are passing still res file is not getting > > > generated !!.Any one faced this kind of issue? I am using > > > C:\>ruby -v > > > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - version > > > Thanks in advance, > > > - Basu --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Issue in generating result file(.xml file)
What library are you using to create the XML file? Regards, Alister On Jan 27, 6:45 pm, basu wrote: > This behavior is random (some times it generates and some times it > does not) > > On Jan 27, 1:17 pm, basu wrote: > > > Hi, > > I am facing the issue after the test execution, > > > C:\>ruby Preferences_Phase2.rb > > Loaded suite Preferences_Phase2 > > Started > > . > > Finished in 1801.094 seconds. > > > 9 tests, 86 assertions, 0 failures, 0 errors > > c:/ruby/lib/ruby/1.8/fileutils.rb:1255:in `copy': unknown file type: C: > > \testpref\TEST-Preferences-Phase2 > > .xml (RuntimeError) > > from c:/ruby/lib/ruby/1.8/fileutils.rb:451:in `copy_entry' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1324:in `traverse' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:448:in `copy_entry' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:423:in `cp_r' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1395:in > > `fu_each_src_dest' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1411:in > > `fu_each_src_dest0' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:1393:in > > `fu_each_src_dest' > > from c:/ruby/lib/ruby/1.8/fileutils.rb:422:in `cp_r' > > ... 11 levels... > > from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' > > from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' > > from c:/ruby/lib/ruby/1.8/test/unit.rb:278 > > from WinampClient_Preferences_Phase2.rb:741 > > > All the tests are passing still res file is not getting > > generated !!.Any one faced this kind of issue? I am using > > C:\>ruby -v > > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - version > > Thanks in advance, > > - Basu --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Problem installing watir gem
Please follow instructions on this page: http://wiki.openqa.org/display/WTR/Install+Watir If this does not, please post exactly what you are doing and the error message you are receiving. You do not need to install FireWatir if you are using Windows. Regards, Alister On Jan 27, 6:43 pm, malar wrote: > Hi frndz, > > I have installed Ruby186-25 in my system.and > i am not able to install watir. > i hav downloaded watir1.6.2. > my browser is Internet Explorer..will it requires firewatir and > commonwatir? > i hav tried to install but i am getting " error> > > please anyone help me > > thankx in adavnce --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Reading number from excel sheet and using as string
Did you simply try? > value = worksheet.Range("b2").Value.to_s On Jan 27, 6:26 pm, magn...@ifi.uio.no wrote: > Hello, I am using WatiR as webtesting tool and I have seperated the > data onto a Excel file and I am using the following to connect the > workbook with testdata to the Watir script: > > require 'win32ole' > > excel = WIN32OLE::new("excel.Application") > workbook = excel.Workbooks.Open("C:\\Programfiler\\Ruby\\FPSdata.xls") > worksheet = workbook.WorkSheets(1) # get first workbook > value = worksheet.Range("b2").Value # get the value at cell b2 in > worksheet. > > In the last line "b2" refers to a number in a Excel cell with a numer > (1200). > > Executing the script this error message occurs: > > :/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb: > 390:in `limit_to_maxlength': undefined method `length' for > 1200.0:Float (NoMethodError) > > It seems like > "value = worksheet.Range("b2").Value" > doesn't support the format in the Excel cell, because when I try to > get another value that is a string i.e. "John" > it works fine. > > Do I need to convert to string? > > How would you write the code: > "value = worksheet.Range("b2").Value" > with the toString in Ruby to_s? > > I hope someone can help me! > > Cheers --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Watir working on Vista
Watir fully works on Windows Vista. Please provide detailed instructions on exactly what you are trying to do, including code you are using. Regards, Alister On Jan 27, 8:07 pm, Vicky wrote: > Hello friends, > > When i am trying to use watir on vista OS. Watir is not able to fetch > elements. > Can anyone help me by telling how to solve this problem. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Watir working on Vista
Hello friends, When i am trying to use watir on vista OS. Watir is not able to fetch elements. Can anyone help me by telling how to solve this problem. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] to string?
Hello, I am using WatiR as webtesting tool and I have seperated the data onto a Excel file and I am using the following to connect the workbook with testdata to the Watir script: require 'win32ole' excel = WIN32OLE::new("excel.Application") workbook = excel.Workbooks.Open("C:\\Programfiler\\Ruby\\FPSdata.xls") worksheet = workbook.WorkSheets(1) # get first workbook value = worksheet.Range("b2").Value # get the value at cell b2 in worksheet. In the last line "b2" refers to a number in a Excel cell with a numer (1200). Executing the script this error message occurs: :/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb: 390:in `limit_to_maxlength': undefined method `length' for 1200.0:Float (NoMethodError) It seems like "value = worksheet.Range("b2").Value" doesn't support the format in the Excel cell, because when I try to get another value that is a string i.e. "John" it works fine. Do I need to convert to string? How would you write the code: "value = worksheet.Range("b2").Value" with the toString in Ruby to_s? I hope someone can help me! Cheers --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Issue in generating result file(.xml file)
This behavior is random (some times it generates and some times it does not) On Jan 27, 1:17 pm, basu wrote: > Hi, > I am facing the issue after the test execution, > > C:\>ruby Preferences_Phase2.rb > Loaded suite Preferences_Phase2 > Started > . > Finished in 1801.094 seconds. > > 9 tests, 86 assertions, 0 failures, 0 errors > c:/ruby/lib/ruby/1.8/fileutils.rb:1255:in `copy': unknown file type: C: > \testpref\TEST-Preferences-Phase2 > .xml (RuntimeError) > from c:/ruby/lib/ruby/1.8/fileutils.rb:451:in `copy_entry' > from c:/ruby/lib/ruby/1.8/fileutils.rb:1324:in `traverse' > from c:/ruby/lib/ruby/1.8/fileutils.rb:448:in `copy_entry' > from c:/ruby/lib/ruby/1.8/fileutils.rb:423:in `cp_r' > from c:/ruby/lib/ruby/1.8/fileutils.rb:1395:in > `fu_each_src_dest' > from c:/ruby/lib/ruby/1.8/fileutils.rb:1411:in > `fu_each_src_dest0' > from c:/ruby/lib/ruby/1.8/fileutils.rb:1393:in > `fu_each_src_dest' > from c:/ruby/lib/ruby/1.8/fileutils.rb:422:in `cp_r' > ... 11 levels... > from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' > from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' > from c:/ruby/lib/ruby/1.8/test/unit.rb:278 > from WinampClient_Preferences_Phase2.rb:741 > > All the tests are passing still res file is not getting > generated !!.Any one faced this kind of issue? I am using > C:\>ruby -v > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - version > Thanks in advance, > - Basu --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] How to Install watir
Hi frndz, I have installed Ruby186-25 in my system.and i am not able to install watir. i hav downloaded watir1.6.2. my browser is Internet Explorer..will it requires firewatir and commonwatir? i hav tried to install but i am getting " please anyone help me thankx in adavnce --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[wtr-general] Issue in generating result file(.xml file)
Hi, I am facing the issue after the test execution, C:\>ruby Preferences_Phase2.rb Loaded suite Preferences_Phase2 Started . Finished in 1801.094 seconds. 9 tests, 86 assertions, 0 failures, 0 errors c:/ruby/lib/ruby/1.8/fileutils.rb:1255:in `copy': unknown file type: C: \testpref\TEST-Preferences-Phase2 .xml (RuntimeError) from c:/ruby/lib/ruby/1.8/fileutils.rb:451:in `copy_entry' from c:/ruby/lib/ruby/1.8/fileutils.rb:1324:in `traverse' from c:/ruby/lib/ruby/1.8/fileutils.rb:448:in `copy_entry' from c:/ruby/lib/ruby/1.8/fileutils.rb:423:in `cp_r' from c:/ruby/lib/ruby/1.8/fileutils.rb:1395:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/fileutils.rb:1411:in `fu_each_src_dest0' from c:/ruby/lib/ruby/1.8/fileutils.rb:1393:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/fileutils.rb:422:in `cp_r' ... 11 levels... from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' from c:/ruby/lib/ruby/1.8/test/unit.rb:278 from WinampClient_Preferences_Phase2.rb:741 All the tests are passing still res file is not getting generated !!.Any one faced this kind of issue? I am using C:\>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - version Thanks in advance, - Basu --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---