[wtr-general] Multiple attributes don't supported for FRAME element
Multiple attributes don't supported for FRAME element. It a bug or a feature? ie.frame({:name = 'content', :class='frame-class'}) #This doesn't work ie.frame(:name, 'content') #This works --~--~-~--~~~---~--~~ 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: Object repository
Yes On 13 июл, 18:49, Louis Schatzberg louis.schatzb...@expedata.net wrote: What version of the 'libxml-ruby' gem do we need. I have 1.1.3 is that correct? -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Ivan Kabluchkov Sent: 13/Jul/2009 6:39 AM To: watir-general@googlegroups.com Subject: [wtr-general] Object repository Hello all. I've created an object repository for Watir. May be it will be useful for someone. Documentation and examples are in README file --~--~-~--~~~---~--~~ 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: xml handling
doc.elements.each('//TestObject/Identifier') { |el| puts el.text } doc.elements.each('//TestObject/Locator') { |el| puts el.text } On 30 мар, 10:44, Vikas Tulashyam vtulash...@gmail.com wrote: Hi, I want to read a xml file. Here is the my XML file-- ObjectMap - TestObject IdentifierTest_Field1/Identifier LocatorTextBox1/Locator ObjTypeTextField/ObjType /TestObject - TestObject Identifier2/Identifier Locatorid=2/Locator ObjTypeTextField/ObjType /TestObject /ObjectMap And I have written the following code-- xml = Document.new File.new(xmlFilePath) xml.elements.each(//TestObject) { |c| puts str } Here, I am abl to read the contents of each TestObject tag. But I want to read Locator and Identifier tags as well. How to do this? --~--~-~--~~~---~--~~ 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: xml handling
doc.elements.each(//TestObject[Identifier='Test_Field1']) { |el| puts el.elements['Locator'].text } On 30 мар, 11:28, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Thanks for the reply.. I want to get the value of the Locator tag in any matching identifier. I am creating a function and passing the value of the Identifier and I want to return the value of the Locator. e.g. -- TestObject IdentifierTest_Field1/Identifier LocatorTextBox1/Locator ObjTypeTextField/ObjType Here, I want to pass Test_Field1 and method should return TextBox1. So is ther any method for this? Thanks Vikas On Mar 30, 12:10 pm, LFIdnl ikabluch...@gmail.com wrote: doc.elements.each('//TestObject/Identifier') { |el| puts el.text } doc.elements.each('//TestObject/Locator') { |el| puts el.text } On 30 мар, 10:44, Vikas Tulashyam vtulash...@gmail.com wrote: Hi, I want to read a xml file. Here is the my XML file-- ObjectMap - TestObject IdentifierTest_Field1/Identifier LocatorTextBox1/Locator ObjTypeTextField/ObjType /TestObject - TestObject Identifier2/Identifier Locatorid=2/Locator ObjTypeTextField/ObjType /TestObject /ObjectMap And I have written the following code-- xml = Document.new File.new(xmlFilePath) xml.elements.each(//TestObject) { |c| puts str } Here, I am abl to read the contents of each TestObject tag. But I want to read Locator and Identifier tags as well. How to do this? --~--~-~--~~~---~--~~ 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: soa testing
For testing SOAP I use SoapUI tool. http://www.soapui.org/ . You can write unit-tests in it On 12 мар, 15:14, bright brightrobin1...@gmail.com wrote: Just to confirm, does Watir supportSOAtesting. --~--~-~--~~~---~--~~ 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
I think your PATH variable was broken. You should add info about ruby path into PATH variable. Or insert 'require 'rubygems' ' at the begin of your tests On 3 мар, 16:56, Jmitchum juliamitc...@gmail.com wrote: I had to reinstall Watir/ Ruby after several attempts, I found I had to delete the registry entries, they are not deleted with the app was uninstalled. I apparently missed some, and finally installed Watir/ Ruby in a different directory. Now when I attempt to run a script I am getting the following error `require': no such file to load -- watir (LoadError), getting this error when I attempt to run my scripts or a unit test script. --~--~-~--~~~---~--~~ 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: Reading result of a command
If I understand you need to get list of files in directory. You should use FileUtils module to get clear result http://ruby-doc.org/core/classes/FileUtils.html On 3 мар, 17:01, venky venkatesh...@gmail.com wrote: Hi All, I am using system(dir) to execute commands in Command Prompt. I get the result(below) when I execute system(dir) command. I need to store the result in an array. I tried arr = system(dir) which stores true or false. Please throw some light on this Result: === Volume in drive E has no label. Volume Serial Number is 603F-F8C6 Directory of E:\Temp 02/27/2009 07:05 PM DIR . 02/27/2009 07:05 PM DIR .. 03/03/2009 07:11 PM 65 t.rb 02/27/2009 06:22 PM 3,251 temp.rb 02/27/2009 07:05 PM 1,011 temp2.rb 3 File(s) 4,327 bytes 2 Dir(s) 22,208,159,744 bytes free = Thanks, Venkat --~--~-~--~~~---~--~~ 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: Reading result of a command
May be this help you IO.popen(dir) { |f| f.each_line { |line| puts line } } So each 'line' you can save into array. Read more about http://www.ruby-doc.org/core/classes/IO.html#M002267 On 3 мар, 17:01, venky venkatesh...@gmail.com wrote: Hi All, I am using system(dir) to execute commands in Command Prompt. I get the result(below) when I execute system(dir) command. I need to store the result in an array. I tried arr = system(dir) which stores true or false. Please throw some light on this Result: === Volume in drive E has no label. Volume Serial Number is 603F-F8C6 Directory of E:\Temp 02/27/2009 07:05 PM DIR . 02/27/2009 07:05 PM DIR .. 03/03/2009 07:11 PM 65 t.rb 02/27/2009 06:22 PM 3,251 temp.rb 02/27/2009 07:05 PM 1,011 temp2.rb 3 File(s) 4,327 bytes 2 Dir(s) 22,208,159,744 bytes free = Thanks, Venkat --~--~-~--~~~---~--~~ 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: Access Denied Error
I had the same problem. It reproduce if url of main application and url of frame are not equal. For example, if main url (in address field of browser) is http://localhost/index.html and frame url(src) http://127.0.0.1/frame.html and you wants to get some data from elements which locate in frame you must see Access Denied. Use http://127.0.0.1/index.html as main url for except this problem On 23 янв, 16:49, malar b malar.je...@gmail.com wrote: Hi, i am new to watir. The following code is running properly in one machine. ie.show_frames ie.frame(main).link(:text, Add New).click if i try to run in another machine, i am getting Access Denied and Unable to Locate a frame named main errors what is the problem? Can u pl resolve it and tell me. --~--~-~--~~~---~--~~ 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: Opening an Excel file with a variable name
More useful File.join($drive,env,Test_Results,#{$file_name}_Results.xls ) On 17 дек, 00:20, Darin Duphorn dduph...@redbrickhealth.com wrote: Try \\ $drive+\\+env+\\Test_Results\\+$file_name+_Results.xls -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of jas.shel...@hotmail.com Sent: Tuesday, December 16, 2008 3:08 PM To: Watir General Subject: [wtr-general] Opening an Excel file with a variable name All, I am attempting to open an Excel file with Ruby, and have run into a problem. If I open the file with single quotes, like inputFile = input.Workbooks.Open('C:\Folder\sheet.xls') everything works fine. My problem now is that the location of the .xls file has a variable name, like inputFile = input.Workbooks.Open(C:\#{var)\sheet.xls). When I try this, I get an error saying that the file cannot be found. It seems that the 'open' method will only work with single quotes, but to signify a variable in a string in Ruby you have to use double quotes. Has anyone discovered a way around this? Thanks in advance for any help. - Shelton --~--~-~--~~~---~--~~ 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: Modal Dialog goto with no wait
In these cases I execute command in another thread. If anybody suggest another usefull method I will be happy :) . Try this: ... thr = Thread.new { ie.goto javascript:OpenPage(); } sleep(3) #time to wait of javascript popup thr.kill puts ie.modal_dialog.html # now must gets here On 10 дек, 06:42, Sean [EMAIL PROTECTED] wrote: Hello All -- I'm trying to launch a modal dialog using the following code. I believe I have to tell the goto to not wait for the page to finish loading but I cant find out how. if it was a button, I could use click_no_wait. Is there a goto_no_wait or a way I can tell Watir to not wait. Thanks in advance. ie = Watir::IE.new loginURL = login.aspx puts Opening login page (#{loginURL}) ... ie.goto loginURL Watir::Waiter::wait_until {ie.text_field(:name, txtUser).exists?} ie.text_field(:name, txtUser).set username ie.text_field(:name, txtPassword).set password ie.button(:name, cmdLogin).click ie.goto javascript:OpenPage(); puts ie.modal_dialog.html # never gets here --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: operator not working
Or you can execute puts real.length; puts list.length . That shows you what the length of stings On 2 дек, 11:07, LFIdnl [EMAIL PROTECTED] wrote: May be your variable 'real' and 'list' have another not visible character like as whitespace. Try exucuite puts '#{real}'; puts '# {list}' . Result should be in apostrophies. On 2 дек, 10:12, Prince3105 [EMAIL PROTECTED] wrote: Hi Experts, I am totally new to Ruby and Watir. Before i was using QTP with VBscript. Today i have encountered a various problem. I have used below code to retrieve cell value from a table then i have to check these values with the actual value. version Ruby - 1.8.6-26 Final Release Watir - Watir 1.6.0 real = ie.frame(:id,wfFrame).table (:id,lkpTradingPartnerType_LkpTblRows) [2] [1] list = ie.frame(:id,wfFrame).table (:id,lkpTradingPartnerType_LkpTblRows) [3] [1] puts real puts list if real == AO list == HQ puts real puts list puts Pass else putsFail puts real puts list end Test gets fail and i wondering about below result. ruby ADM0005.rb AO HQ Fail AO HQ Exit code: 0 If any error on my code please let me know, if any other easy and effective way available please reply. Thanks, Prince3105 --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Screenshot on remote machine
Thanks it's work On 19 нояб, 16:07, juuser [EMAIL PROTECTED] wrote: It works for me fine if Remote Desktop window is not minimized. It might not be maximized or under any other window, but as soon as it gets minimized, then AutoIt and screenshots won't work. Also, it should not have screensaver, nor locked (on remote machine). You can have screensaver and lock your workstation from the pc where you're running remote desktop without any negative effects though. On Nov 19, 10:50 am, LFIdnl [EMAIL PROTECTED] wrote: Hi all! I run watir scripts on remote computer (logged-in through MS Remote Desktop ). In case of error/exceptions script make a screenshot with a win32screenshot.gem , but result of screenshot - black rectangle. On local machine screenshot has normal image. What can I do for take a normal screenshot on a remote computer? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: how to copy text from modal window
Try to use ie.modal_dialog(:title, 'Title of your modal window') On 12 нояб, 12:55, meaculpa [EMAIL PROTECTED] wrote: The text is An allotmentrequest with id IND50 has been created I want to take IND50please helpurgent --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to access a child object
Initially you should to add new tag (if watir doesn't support 'object' tag): module Watir class Object NonControlElement TAG = 'OBJECT' end end And after use: ie.frame(:id, 'url').object(:id, 'flexApp') I didn't test it but i think it must work :) On 23 окт, 19:44, LanOK [EMAIL PROTECTED] wrote: I need to access an object (picture). I know that it's flex object. I don't know a method which can reach an element OBJECT If anybody knows, please help. I thing may be there're any node method (child nodes) which can help to access this object http://groups.google.com/group/watir-general/web/1.JPG --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---