Re: [wtr-general] Contains Text
You may try: ie.text.include?(***) Wesley. For life, the easier, the better. On Mon, Mar 7, 2011 at 1:18 PM, Soori sure...@gmail.com wrote: All, I would like to search for a text My Engineering Services on a webpage. This can be a link too. Should I use contains_text method or text_include method? Please advice. /soori -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Question on Sendkeys XPATH
I think your html code is not enough for others to understand. Wesley. For life, the easier, the better. On Tue, Oct 5, 2010 at 7:10 PM, Taki Sama timothy...@gmail.com wrote: Hi All, Im new to Watir, coming from a QTP background. I'm using the following Ruby 1.8.7, Rubygems 1.3.6, Watir 1.6.6 on a Windows 7 X64 system. I happen to need to run multiple 'modules' at the same time on 1 box. Would it be possible to implement a separate instance of 'send_keys' per each run? If the 'modules' happen to use 'sendkeys' at the same time, the whole script gets messed up (focus, typing and sending on the wrong browser). I was also looking at XPATH to avoid using sendkeys (trying to click actual objects); but I am stumped with the syntax to get it working.. please help? Like with and without regex methods please. b.element_by_xpath(// i...@class='CreateRequestComboContainerRightImageCell']/).click b.image(:xpath, // i...@class='CreateRequestComboContainerRightImageCell']/).click None of them seem to get the desired result; (I'm assuming this for instances that I wont be able to get a unique id or name) Here is a sample structure: td class=CreateRequestComboContainerRightImageCell id=Master_PageContentPlaceHolder_screen_ctl01_bc8ee8e9_1efe_463b_9e46_780e216598f1_screen_jobTitleCombo_ContainerRightImageCell jQuery1286272679885=60 img class=CreateRequestComboRightImage id=Master_PageContentPlaceHolder_screen_ctl01_bc8ee8e9_1efe_463b_9e46_780e216598f1_screen_jobTitleCombo_RightImage src=/XXX/Theme/AttachmentHandler.ashx? Parameter=Theme.ControlImages.XComboSelectorDropDown complete=complete/ -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Welcome Jarmo Pertman to the core Watir team
Welcome Pertman, another great guy! I think Watir will be more powerful and attractive! Wesley. For life, the easier, the better. On Mon, Sep 27, 2010 at 4:56 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Jarmo, welcome to the team! :) One comment inline. On Fri, Sep 24, 2010 at 11:26 PM, Charley Baker charley.ba...@gmail.com wrote: I'd recommend anyone doing Watir testing to also do a podcast with Zeljko +1 :) Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Use ruby script to get logs from linux server.
Hi, Guys, Currently, I use a tool in windows, named WinSCP, I login by username password, then I turn to a path /usr/lib/system.log, I will capture the unexpected content in the log. Now, I want to write a ruby code in windows to do the job, capture the log out directly. It will be the best if my script can capture only the latest error interface errors. It is a ruby question, but I still would like to ask in the group. Any suggestion would be really appreciated. Wesley. For life, the easier, the better. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Use ruby script to get logs from linux server.
Hi Zeljko, I have to capture the log from the remote server with username/password. I will access it in my machine. Maybe your script can help. Would you please share it to me? I will have a try. Wesley. For life, the easier, the better. On Wed, Sep 29, 2010 at 9:13 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Sep 29, 2010 at 3:10 PM, Wesley Chen cjq@gmail.com wrote: It will be the best if my script can capture only the latest error interface errors. If I understood you, you want to parse a log file and create a report? If that is correct, I have a script that does just that. It is easy to open a file (even remote file) in Ruby, and parse it. What is the problem? Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Use ruby script to get logs from linux server.
Hi, Zeljko, I use Windows system, I want to use ruby script to access a remote file in a linux server, I have to input Username and password to access the linux server. So, do you have any suggestion? Wesley. For life, the easier, the better. On Wed, Sep 29, 2010 at 9:20 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Sep 29, 2010 at 3:17 PM, Wesley Chen cjq@gmail.com wrote: I have to capture the log from the remote server with username/password. I will access it in my machine. The problem is opening a remote file? Or something else? What have you tried so far? Any code to share? Maybe your script can help. Would you please share it to me? There is nothing really to share there, just opening a file and then parsing it. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Use ruby script to get logs from linux server.
Hi, Zeljko, Thank you for your help, I tried your suggestion, but I didn't find the solution. Wesley. For life, the easier, the better. On Wed, Sep 29, 2010 at 9:27 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Sep 29, 2010 at 3:24 PM, Wesley Chen cjq@gmail.com wrote: I use Windows system, I want to use ruby script to access a remote file in a linux server, I have to input Username and password to access the linux server. How do you access the file, via FTP? http://ruby-doc.org/stdlib/libdoc/net/ftp/rdoc/index.html Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Rich calender how to get value
If you are not sure what you want to do, please try the cases you have. Wesley. For life, the easier, the better. On Wed, Jun 30, 2010 at 1:38 PM, naresh nareshvatsa...@gmail.com wrote: Hi, I am confused in rich calender, i need to click image and then get elements or do like following ie.cell(:class = j_id354_j_id355DayCell rich-calendar-cell rich- calendar-btn, :text = 16).click which Linden suggested. I am confused class, there is 2 classes in HTML code. class=rich-calendar-input class=rich-calendar-button which one to use. My requirement to select a 30-jun-2010 date from calender. Regards, Naresh On Jun 29, 8:32 pm, Chuck van der Linden sqa...@gmail.com wrote: If it's the same as the sample that was linked early in the thread, when this control is rendered in the UI, it is a series of table cells, and each cell is 'wired' for a number of events. You may need to experiment with what events are fired in what order, I'd start however with trying the following What you are looking at is structured around a table, and each date is a cell. Because some dates appear more than once you cannot reliably identify by the cell text alone, and will need to use some other means to identify the 'right' type of cell that has the right text. The ID is completely positional within the grid, meaning that it's relationship to the date will be different each month (7 possibilties). that makes using ID to get the right cell a total pain. This would seem to make the best option to utilize the CLASS of the cell, since the controll uses a small set of potential classes (borders, holidays, workdays)So using Class along with Text might be your best bet, presuming of course that you want to pick a date in the current month of the current year etc. (otherwise you are going to need to first click in the navigation cell, part of an inner table, that lets you pick month and year. OTOH since those values are unique, you should be able to select them by cell text alone. .. So it will depend on if you test uses some date relative to 'today' or is always picking the same date. Relative to Today is fairly easy given Ruby's fairly robust stuff for handling dates, but is problimatic in that the date could end up falling on a holiday, meaning it would be difficult to predict the cell's class ahead of time If you are going to always pick the same date, choose one that is NOT in the current month, otherwise your script will break as soon as the month changes. This means you will first need to set the calendar control to a specific year and month, THEN pick your day of the week. Identify it as a Cell element within a Table, In the example the main table container in the example has the Class rich-calendar- exterior rich-calendar-popup undefined The cells for dates have three potential classes, there's a special one for 'border' days (the dates in the months before or after the current month) one for the 'holidays' (sat and sun) and one for the weekdays of the current month.. If I wanted to pick a weekday of the current month, then once the proper thing is clicked to make the calendar visiable (rendered) you could so something along these lines I think browser.cell(:class = j_id354_j_id355DayCell rich-calendar-cell rich- calendar-btn, :text = 16).click Since I'm not too sure of the first part of that class (might be dynamically created) you might have to use a regular expression just using the second part (/rich-calendar-cell rich-calendar-btn/) in order to reliably identify the cell by class and text. (that presumes just doing a click is good enough, potentially you might have to fire other events, you'll need to experiment) The IE developer Toolbar is a great help in making sense of controls like this, as it allows you to view the control as it is rendered into the DOM, (Firebug has similary abilities, I just know how to use the IE tool better, so it's what I use) On Jun 28, 5:07 am, naresh nareshvatsa...@gmail.com wrote: Hi All, i am using internet explorer to test my web application. I have to click save button in my application to create record. I am able to set value for textfield,radibutton,selectlist in watir script , but not able to set/pickup value for calender. This calender is rich calenderrich:calender from Rcihfaces. The html code generated i am pasting once again. I want to pick up date like 28-May-2010 or any other date. div id=globalForm:startDateDecorate div class=proplabel for=globalForm:startDateDecorate:startDate class=name Start Date:/label span class=value span id=globalForm:startDateDecorate:startDatePopup input class=rich-calendar-input id=globalForm:startDateDecorate:startDateInputDate name=globalForm:startDateDecorate:startDateInputDate style=vertical- align: middle;
Re: [wtr-general] Re: Watir ads at stackoverflow.com
Nice to hear that. :) Wesley. For life, the easier, the better. On Thu, Jun 24, 2010 at 7:03 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: A big thank you to everybody that voted for Watir ad at Stack Overflow. We have 7 votes at the moment, 6 are needed before the ad is displayed. In the first day the ad is displayed over 9000 times, and 9 people clicked on it. That means we have 0.1 % click-through rate. You can see the stats (and vote) at http://rads.stackoverflow.com/ossads/all Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Regarding Script
Your script runs well on other system, so it is not script problem; Would you try clear your browser session and cookies and try again? What's error message when you run the script? Wesley. For life, the easier, the better. On Mon, Jun 21, 2010 at 7:52 PM, Zubair zubair.rk...@gmail.com wrote: Hi, I have written an script like:- 1)Open Webbrowser 2)Open Google.com 3)Now setText on the textBox then 4)Click on the Button. my problem is that Text is not being set into the TextBox, and if i am runnig this Script on the other system, it is working properly. I have reinstall Ruby many times but problem still persist. my Script is: require watir url=www.google.co.in ie=Watir::IE.new ie.bring_to_front ie.maximize ie.goto url t=ie.text_field(:name,q) t.set(Delhi) b=ie.button(:name,btnG) b.click sleep(2) ie.close -- Please tell me the Proper solution -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] How to read a google doc or send a google mail?
I just want to have a try on the gmail and goog doc. In fact, I can use ruby-mail to get emails and send email in google. I think google mail and google doc are really welcome, if I can access them in Watir, that would be great. Wesley. For life, the easier, the better. On Mon, Jun 14, 2010 at 4:27 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Sat, Jun 12, 2010 at 7:42 AM, Wesley Chen cjq@gmail.com wrote: Problem 1: Send an gmail(Click Compose Mail link, input Email to, Subject, Email content, click Send button); Problem 2: Go to Google Documents page, open an existing DOC/PPT/excel, read the data in it. Do you need to test Gmail's web interface or just get mail from there? The same question for Docs, do you just need the data or do you need to test web interface? Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Automating omniture tags
First, you have to prepare a xls file, in the file, in the file, the data is your expected data, the format is as below: s.pageNameHome Page s.channel s.prop3x Please write a method, get all the data from xls out into an array/hash A; Second, you have to capture all the sc value out from the page source, suppose the value is actual_sc_values. *actual_sc_values = ie.html.scan(/s\..*/)* The comment can capture all the s. out into an array, you can make it an array or a hash B. Then, you just need compare A to B. Do you think so? Wesley. For life, the easier, the better. On Fri, Jun 11, 2010 at 2:58 PM, Marlon marlonmoja...@gmail.com wrote: Ah ok, sorry I over looked this one, yes it is implemented using javascript Example: script type=text/javascript language=JavaScript s.pageName = Home Page; s.channel = Home Page; s.prop3 = Home Page; s.prop34 = No; s.eVar18 = No; /script Can you show me a sample script for checking this? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] How to read a google doc or send a google mail?
Hi, Guys, I have used Watir for a long time, now, two difficult problems are still challenges to me. Problem 1: Send an gmail(Click Compose Mail link, input Email to, Subject, Email content, click Send button); Problem 2: Go to Google Documents page, open an existing DOC/PPT/excel, read the data in it. If you guys have any solutions on the two problems, that would be really appreciated. Wesley. For life, the easier, the better. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: How to create a file and save it.
When you have installed Ruby, there is a man doc, I think for the newbie, you can study a lot from it, and it is really basic but important. Wesley. For life, the easier, the better. On Fri, Jun 4, 2010 at 2:01 AM, orde ohil...@gmail.com wrote: The Ruby IO and File classes contain untold goodies. I'd suggest reading up on them: http://www.ruby-doc.org/core/classes/File.html http://www.ruby-doc.org/core/classes/IO.html Hope it helps. orde On Jun 3, 7:49 am, Adam Reed reed.a...@gmail.com wrote: With respect, file manipulation is a basic feature of Ruby. WATIR is a testing library/tool that makes use of the basic built-in Ruby functionality. That is the distinction that is being made. In your case, you would need to design a way to locate the Order Id, temporarily assign that value to a variable, open or create a text file, and finally write this value to the file. Which step in that process are you having difficulty coding? Thanks, Adam On Jun 3, 9:17 am, meaculpa harismah...@gmail.com wrote: Its WATIR specific only. And This is not a blanket request for help. Everyone in this forum are having experience and they are not just NOOBS. So they can surely understand what i mean... Also After googling only I post here... I believe this group is mainly for helping each other than creating specific rules !!! I accept that my question was little. My actual problem is : From a webpage I get a Order Id. I want to save that in a notepad. I googled and didnt find any help. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] How to handle a pop up having drop down under itself
Maybe the pop up is a div or a iframe. Wesley. For life, the easier, the better. On Tue, Jun 1, 2010 at 1:19 AM, windy lyfi2...@sina.com wrote: do you mean that popup is a modal dialog ? please try this : ie.modal_dialog() to attach this popup. see more : http://www.infoq.com/news/Watir-Adds-Support-for-Modal 在 Mon, 31 May 2010 23:36:05 +0800,Saket sktmis...@gmail.com 写道: Hi All, I am working with an application where a pop up is generated after clicking on a button. Once the pop up is generated it deactivates the original web page unless the user completes its action in the pop up. This pop up contains several drop downs. I am unable to access these drop downs. Please assist.. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] [ANN] Win32::Screenshot 0.0.4
Hi, Zeljko, Have you got the inner code for *snapit.exe*? Wesley. For life, the easier, the better. 2010/5/28 Željko Filipin zeljko.fili...@wa-research.ch On Thu, May 27, 2010 at 10:23 PM, Jarmo Pertman jarm...@gmail.com wrote: I'm thinking that here are probably some people who would like to take screenshots in their tests so i'll write about Win32::Screenshot in here also. I am currently using this: http://github.com/90kts/snapIt Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: text_filed validation - onchange alert window
I think you can search the method as set_no_wait in Watir general group. Then you may have a try on it. Wesley. For life, the easier, the better. On Fri, May 28, 2010 at 7:54 AM, kashyap kashyap...@gmail.com wrote: Thank you for posting in the link.I checked it before and I tried one of the solutions and it works fine if there is a button in the form that triggers the javascript validation function. However, in my web form, whenever i enter some data in the text_field, the onchange event gets called, this triggers the alert box.I cannot use click_no_wait as it is not a button that I am clicking. I am actually setting some value to a test_field like this: $ie.text_field(:id, @ssid).set(ssid) Whenever, this statement gets executed, the ssid text_field gets filled with the value that is stored in ssid string and immediately the onchange event gets triggered like this: INPUT class=longbox id=WlanEssid maxLength=32 onchange=IsSsidValid( this ) name=WlanEssid value=MedNet.WPAPSK / the javascript function IsSsidValid(this) actually does the validation of the ssid text_field and displays an alert box with a corresponding error message if there is an invalid entry. I want to actually get handle of this alert box and access the text in it to cross check it.So is there a way that I can access the text of that javacript pop-up? On May 27, 1:19 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 27, 2010 at 10:13 PM, Adam Reed reed.a...@gmail.com wrote: Exactly what I came to post; You're too fast Željko! The fastest gun in the West! :) Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Parse IFrame with Nokogiri and Watir
When I google Nokogiri, not much info, any great amazing place for Nokogiri? Wesley. For life, the easier, the better. On Thu, May 20, 2010 at 10:32 PM, Berto m...@clutchwave.com wrote: Nokogiri -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Issue with accessing an Object in FireWatir
You have so much page source code. Is it better for other people to read your emails if you attach an attachment? Wesley. For life, the easier, the better. On Mon, May 17, 2010 at 8:55 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Monday, May 17, 2010, Betsy joybe...@gmail.com wrote: Can it be an issue with the code? Yes. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Tabs
ie = Watir::IE.attach(:title, xxx) can locate an existing IE window. ie.close can close the ie window Wesley. For life, the easier, the better. On Thu, May 13, 2010 at 4:26 AM, Brad bradask...@gmail.com wrote: Hello, I want to click on all the links on a page, got it, I have this working no problem. Some links have their target set to _blank which in turns involves a new tab (a browser tab) inside the same browser window. So if I only had one tab visible and active when the link is clicked now I have two tabs. So I have two questions: How do I go back to the original tab? How can I close the newly opened tab? Please let me know if you need more information. Thanks. Brad -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] No method works for Frame
I think you don't know how to use iframe. It should be ie.frame(:name, xxx).image(:src, ).click Wesley. For life, the easier, the better. On Fri, Apr 16, 2010 at 1:06 PM, Kinnu kiranyajaman...@gmail.com wrote: Hi Friends, I am unable to identify elements inside a frame and no method of element class is working(like exists?, click() etc). Following is the current issue i am facing: In my project, compose mail window is developed in frame and when I copy a image inside compose body, folloing are the things I tryed and nothing is working 1. puts ie.frame(edit_body).exists?() gives error saying exists?() is not a valid method for frame 2. puts ie.frame(edit_body).image(:title, TestPic.jpeg).exists?() gives error saying exists?() is not a valid method for frame Tried all combination's but no luck. Is handling frames a drawback for Watir itself? Is there soemthign that i should ask my developers to enable ? Will be great if some one who is also facing this problems let us know solution if at all if any Thanks, Kiran Y -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com
Re: [wtr-general] Simple Ruby script not working on Windows Vista IE8 configuration
Please try to remove require 'rubygems' from your script and then run it. Wesley. For life, the easier, the better. On Mon, Apr 12, 2010 at 1:47 PM, Vijay Shinde shindevija...@gmail.comwrote: ode:0x800706b5 -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject.
Re: [wtr-general] Re: ajax and unable to locate element
Please don't use the method: try again The method below is really helpful. Watir::Waiter.wait_until{$ff.div(:id, addAlbumLink).exists?} Wesley. For life, the easier, the better. On Fri, Apr 9, 2010 at 2:00 AM, Sal Jamil salem.m.ja...@gmail.com wrote: mber of tries and wait between tries -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject.
Re: [wtr-general] Re: FireWatir doesn't wait for the page to load after clicking a button
Watir::Waiter.wait_until{$ff.div(:text, /Done/).exists?} can also work for Firefox Wesley. For life, the easier, the better. On Thu, Feb 11, 2010 at 12:04 PM, Ramapulla Reddy ramapullare...@gmail.comwrote: I have faced same problem and firewatir allows multiple attributes to use. Try using wait_until function to check the element is loaded or not. -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject.
Re: [wtr-general] Checking for contents of a text field
ie.text_field(:id,mytextfield).value will get the value in the text field. You can't get the text_field attribute value by it. Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 9:27 AM, Rats crapats...@yahoo.com.au wrote: I'm trying to check if a field is populated on a page. This command works fine and returns found it: if ie.text_field(:value,'some value').exists? puts 'found it else puts did not find it end However this one doesn't: if ie.text_field(:id,mytextfield).value == 'some value' puts 'found it else puts did not find it end If I understand correctly the first example is looking for ALL text fields on the page to see if any of them have some value. The second is more specific and is looking at a particular text field. I know for certain that mytxtfield contains the text I am looking for ... -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com
Re: [wtr-general] Checking for contents of a text field
You'd better not use :value to locate on text field. Because the value in text field can change manual. Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 9:47 AM, Wesley Chen cjq@gmail.com wrote: ie.text_field(:id,mytextfield).value will get the value in the text field. You can't get the text_field attribute value by it. Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 9:27 AM, Rats crapats...@yahoo.com.au wrote: I'm trying to check if a field is populated on a page. This command works fine and returns found it: if ie.text_field(:value,'some value').exists? puts 'found it else puts did not find it end However this one doesn't: if ie.text_field(:id,mytextfield).value == 'some value' puts 'found it else puts did not find it end If I understand correctly the first example is looking for ALL text fields on the page to see if any of them have some value. The second is more specific and is looking at a particular text field. I know for certain that mytxtfield contains the text I am looking for ... -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com
Re: [wtr-general] Re: ajax and unable to locate element
If there is ajax, please use *fire_event* before you *set* Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:09 AM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com
Re: [wtr-general] Re: ajax and unable to locate element
Of course not. Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:25 AM, Sal Jamil salem.m.ja...@gmail.com wrote: Thanks. I am using jquery to bind a click event to a button. Through Watir, I am setting the button and that event is firing correctly and populating the div from the server. Do I need to also do a fire_event? Isn't that duplicating the button set event? On Wed, Apr 7, 2010 at 11:12 PM, Wesley Chen cjq@gmail.com wrote: If there is ajax, please use *fire_event* before you *set* Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:09 AM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com
Re: [wtr-general] Handling a windows file upload dialog box
For file upload button, there is a ready method, named: $ie.file_field(:name, ).set(your file.txt) Wesley. For life, the easier, the better. On Tue, Apr 6, 2010 at 12:07 PM, Rats crapats...@yahoo.com.au wrote: Firstly, I should have probably mentioned in my previous posts I am a Watir newbie. However I have done a fair bit or programming so have some knowledge when it comes to using Watir. Ok, my latest problem is to do with handling a windows file upload dialog box. I've done searches through this NG and found that this is a fairly common problem. The solutions I've come across suggest use of .click_no_wait. I'm trying to write some code that will click the file upload button, enter a file name (full path) in the file name field and then hit enter. This is what I tried: ie.button(:name, file_upload_button).click_no_wait ie.send_keys(c:\test.txt) ie.send_keys({ENTER}) Unfortunately click_no_wait just flashes the button and the dialog box does not pop up. I've tried click by itself and that opens the dialog box but of course the rest of the script does not execute. Any ideas? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe, reply using remove me as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com
Re: [wtr-general] Created a gem 'watir_helper' for making Automation Testing Simpler and Easier
Thank you, guy, it is helpful. Wesley. For life, the easier, the better. On Thu, Mar 25, 2010 at 7:40 PM, Ankur Gera ankurg...@gmail.com wrote: Hi All, I have created a gem 'watir_helper' for making Automation Testing Simpler and Easier.You all can download it from the following link :- http://github.com/ankurgera/ankur_watir_helper Also i have attached a small presentation about my gem 'watir_helper. Request to you all please let me know your precious comments/suggestions about it. Thanks Regards, Ankur Gera -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com To unsubscribe from this group, send email to watir-general+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com To unsubscribe from this group, send email to watir-general+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [wtr-general] Re: How to Click on the Browser File Menu Using Watir
Your problem is dealing with the file download popup. Please search in Watir official website or in the group. Wesley. For life, the easier, the better. On Tue, Mar 23, 2010 at 11:15 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Mar 23, 2010 at 4:10 PM, Praveen praveen99...@yahoo.com wrote: Hi Pl can u write the script for this I would do it manually. I didnt understand , how to browse the archivies Take a look at the footer of this e-mail. You will see this: You received this message because you are subscribed to http://groups.google.com/group/watir-general Click the link, find the search box at the page that opens and search for file download (or similar). If you can not find the answer, let us know what you have tried, and we will let you know what to try next. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com To unsubscribe from this group, send email to watir-general+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com To unsubscribe from this group, send email to watir-general+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [wtr-general] Yahoo mail compose
I think you have to post your script here. Wesley. For life, the easier, the better. On Thu, Mar 18, 2010 at 6:18 PM, Dilip M lovingdilip...@gmail.com wrote: Hi All, I am automating yahoomail..while i am doing so i encountered a problem.. i will explain here that problem plz can any one solve and guide me to solve.. i can able to login successfully.then after while composing a mail iam unable to compose a new mail. I am using IE, watir plz.. try and solve this problem... if any one has solution plz. mail me... lovingdilip...@gmail.com Thanks In advance.. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com To unsubscribe from this group, send email to watir-general+ unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com To unsubscribe from this group, send email to watir-general+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [wtr-general] Query regarding chromewatir
I use the latest version of chromewatir, I have also met a problem. When I run the code below: *require chrome_watir** **$browser = ChromeWatir::Browser.new* *$browser.goto(**www.google.com* http://www.yahoo.com/*)* *$browser.text_field(:name, q).set hello world* *$browser.button(:index, 1).click* The script hangs when it turns to www.google.com, it can't access the text field. When I close the browser, it displays the error message as below: *d:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/chrome_watir/container.rb:348:in `recv': An existing connection was forcibly closed by the remote host. - recvfrom(2) (Errno::ECONNRESET)* Wesley. For life, the easier, the better. On Thu, Mar 11, 2010 at 12:06 PM, Mrunal mrunal.gor...@gmail.com wrote: ory or anyw -- 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
Re: [wtr-general] Query regarding chromewatir
In fact, it can open the IE window, but it can't access the text field. Wesley. For life, the easier, the better. On Thu, Mar 11, 2010 at 5:17 PM, Wesley Chen cjq@gmail.com wrote: Hi, Zeljko, When I install gem install selenium-webdriver gem install watir-webdriver --pre I run the code below: *require watir-webdriver* *browser = Watir::Browser.new(:internet_explorer)* *browser.goto(www.google.com)* *browser.text_field(:name, q).set(Hello world)* *browser.button(:index, 1).click* I get error message: d:/ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.0.1.dev5/lib/watir-webdriver/base_element.rb:324:in `assert_writable': Watir::Exception::ObjectReadOnlyException (Watir::Exception::ObjectReadOnlyException) When I change the *:internet_explorer* to *:chrome*, anything goes expected. Wesley. For life, the easier, the better. On Thu, Mar 11, 2010 at 5:01 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Mar 10, 2010 at 11:59 AM, Mrunal mrunal.gor...@gmail.com wrote: I want to test the web applications with google chrome. I am not sure ChromeWatir is in active development any more. Try watir-webdriver, it can drive Chrome: http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/ Željko -- watir.com - community manager pledgie.com/campaigns/2982 - donate to Watir watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] Query regarding chromewatir
Try: require chrome_watir $k = ChromeWatir::Browser.new $k.goto(www.yahoo.com) Wesley. For life, the easier, the better. On Wed, Mar 10, 2010 at 6:59 PM, Mrunal mrunal.gor...@gmail.com wrote: Hi I want to test the web applications with google chrome. I've installed Google Chrome browser and the gem Chromewatir 1.5.1 I tried the following small test require chrome_watir include ChromeWatir $k = Browser.new $k.goto(www.yahoo.com) But when the first time test is executed i get following error. c:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/chrome_watir/ chrome_connection.rb:7:in `initialize': Bad file descriptor - connect(2) (Errno::EBADF) from c:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/ chrome_watir/chrome_connection.rb:7:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/ chrome_watir/chrome_connection.rb:7:in `get' from c:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/ chrome_watir/container.rb:347:in `read_socket' from c:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/ chrome_watir/container.rb:321:in `wait_for_page_to_load' from c:/ruby/lib/ruby/gems/1.8/gems/chromewatir-1.5.1/lib/ chrome_watir/browser.rb:16:in `goto' In the second execution, browser get opened but the test is not coming out from the 'read_socket' method in container.rb Can anybody help me regarding this? Anybody have the solution for this. Please guide. -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] Access to dojopopupmenu2
For the HTML you provide, we can't do anything. Do you want a right click? Why? element_by_xpath is not a good method to locate an element. Wesley. For life, the easier, the better. On Tue, Mar 9, 2010 at 4:56 AM, barb bfwork2h...@yahoo.com wrote: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML Strict//ENMETA http- equiv=Content-Type content=text/html; charset=windows-1252 HTMLHEADFORM id=ipbObject action=/ipb/IpbItemAction.do method=post BODY class=turbo-ie style=CURSOR: default __doClobber__ TABLE class=dojoPopupMenu2 style=Z-INDEX: 1001; LEFT: 280px; TOP: 145px cellSpacing=0 cellPadding=0 border=0 TBODY dojoAttachPoint=containerNode TR class=dojoMenuItem2 __doClobber__ dojoAttachEvent=onMouseOver: onHover; onMouseOut: onUnhover; onClick: _onClick; onKey:onKey; unselectable=on dojoinsertionindex=1 TD class=dojoMenuItem2Label Save /TD /TR/TBODY/TABLE/BODY/FORM/HEAD/HTML -- 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
Re: [wtr-general] Problem with attribute_value() -- Zeljko?
The code below can work in my editor. puts $ie.text_field(:xpath, //inp...@qa='request-form.first_name']/) puts $ie.form(:index, 1).attribute_value(qa) * * *I have the same Watir, ruby version, windows version as you.* *I think you may try the code again.* * * Wesley. For life, the easier, the better. On Thu, Feb 11, 2010 at 6:28 AM, AR reed.a...@gmail.com wrote: @ie.text_field(:xpath, //inp...@qa='request.first_name']/) -- 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
Re: [wtr-general] Re: Problem with attribute_value() -- Zeljko?
No, I use: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] Watir 1.6.5 What's your error message? I think your *text_field* part is not the same as mine. Wesley. For life, the easier, the better. On Thu, Feb 11, 2010 at 9:23 AM, AR reed.a...@gmail.com wrote: Thanks Wesley. The only difference between our examples is that you've set your instance of IE to a global variable and mine is an instance variable, but that shouldn't affect anything. If you get a chance to check your watir/ruby versions I'd appreciate it! Also, I see that I did have a typo in the above post for the command, but I had it correct in previous testing, just not posting. Thanks again, Adam On Feb 10, 7:02 pm, Wesley Chen cjq@gmail.com wrote: The code below can work in my editor. puts $ie.text_field(:xpath, //inp...@qa='request-form.first_name']/) puts $ie.form(:index, 1).attribute_value(qa) * * *I have the same Watir, ruby version, windows version as you.* *I think you may try the code again.* * * Wesley. For life, the easier, the better. On Thu, Feb 11, 2010 at 6:28 AM, AR reed.a...@gmail.com wrote: @ie.text_field(:xpath, //inp...@qa='request.first_name']/) -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] How much time does Watir waits for the page to load?
Of course not. It will wait no more than 300s. Please search in the group, I think you can get what you want. Wesley. For life, the easier, the better. On Tue, Feb 9, 2010 at 11:39 AM, Logic Bomb januwa...@yahoo.com wrote: Hi, I would like to ask how many seconds does Watir waits for the page to load? Does Watir waits forever until the page is loaded? Thanks, Januwatri -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] How to export results into an excel sheet on linux
Please search in the group about how to read and write in openoffice in ruby. Wesley. For life, the easier, the better. On Tue, Feb 9, 2010 at 6:24 AM, Naga ravikus...@gmail.com wrote: Hello, I am new to Ruby - Watir. I am trying to export results in to an excel sheet. I am running watir on linux and not windows. I have seen information on Windows but not linux. Please let me know. Thanks, Naga -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] Output is displayed two times
require 'D:\Waltair scripts\My wokings in waltair\script1.rb' will execute *MyClass.some_method* Wesley. For life, the easier, the better. On Tue, Feb 9, 2010 at 12:14 AM, Charley Baker charley.ba...@gmail.comwrote: You seem to be calling MyClass.some_method from both scripts. Delete the call from the first script. -c On Mon, Feb 8, 2010 at 5:37 AM, ayyappa ayyappa...@gmail.com wrote: Hi guys I am new to watir . I am just working on basic concepts(Using Class ). when i run the script 2 , i got the output displaying two times. Can you please any one tell me any fault in my script Script 1 require 'rubygems' require 'win32ole' require 'watir' class MyClass def self.some_method puts 'something' end end MyClass.some_method Script 2 require 'rubygems' require 'win32ole' require 'watir' require 'D:\Waltair scripts\My wokings in waltair\script1.rb' MyClass.some_method Output of script 2 is = something something -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] Re: how to run watirscript in background
I think that's not what he want. Wesley. For life, the easier, the better. On Fri, Feb 5, 2010 at 4:16 AM, AR reed.a...@gmail.com wrote: You can also set visible:false in the the options.yml file if you don't want to do it on a script by script basis. More details here: http://wiki.openqa.org/display/WTR/Browser.new On Feb 4, 11:37 am, orde ohil...@gmail.com wrote: You can set the browser as invisible after launching the browser (fromhttp://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/IE.html#M000266): browser = Watir::Browser.new browser.visible=(0) Not sure if that's what you're looking for, tho. Hope it helps. orde On Feb 4, 12:14 am, venkat greet.ven...@gmail.com wrote: Thanks in advance if anybody answers my query here it is: i have my watir script named login.rb which checks the functionality of Login, go to Inbox then Logout from Gmail website. If I run this login.rb using google loadtest example, it fails with multiple users (#5), multiple iterations(5). Hence I want run these tests in the background process without seeing on the functional GUI navigation on windows. Would there be any solution to run my tests for load in the backgound? One of my friend's friend gave me clue that it can be done using Fork...Spawn...with parent process/ child process even in windows too... Please help me 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.comwatir-general%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -- 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
Re: [wtr-general] store the Class file
You can store it anywhere, you just need require the file and invoke the methods in it. Wesley. For life, the easier, the better. On Wed, Feb 3, 2010 at 6:10 PM, Nishant nishant.jain2...@gmail.com wrote: http://wiki.openqa.org/display/WTR/HTML+report+class The actual report class (CLReport.class.rb) Where we have to store the Class 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 -- 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
Re: [wtr-general] Can Watir verify the color?
Try these below, I don't know whether they are you want or not: ie.#{element}(:id, foo).document.currentstyle.attributeAsCamelCase so ie.#{element}(:id, foo).document.currentstyle.fontFamily ie.#{element}(:id, foo).document.currentstyle.fontSize ie.#{element}(:id, foo).document.currentstyle.color Sometimes you have to use invoke: ie.#{element}(:id,foo).document.currentstyle.invoke(attributeAsCamelCase) the visible method works this way: ie.#{element}(:id,foo).document.currentstyle.invoke(display) ie.#{element}(:id,foo).document.currentstyle.invoke(isDisabled) Find the list of available methods: ie.#{element}(:id, foo).document.currentstyle.ole_methods #puts ie.div(:class,/Topbackgroud TopFont/).document.currentstyle.fontSize #puts ie.div(:class,/Topbackgroud TopFont/).document.currentstyle.color #puts ie.div(:class,/Topbackgroud TopFont/).document.currentstyle.backGroundColor #puts ie.div(:class,/Topbackgroud TopFont/).document.currentstyle.scrollbarBaseColor Wesley. For life, the easier, the better. 2010/2/1 de Villamil Frédéric fdevilla...@gmail.com Le 1 févr. 2010 à 12:06, Yuping Zhong a écrit : Hi, I want to use the watir to verify the color for some cells that are in the table. Do watir have this function.If so,how to do that? Many thanks! -Zhong Hello, It depends on how the color is applied to the cell. But I guess checking for the style attribute or the class name should do it. However, Watir can't tell you what color is actually displayed on the screen. Regards, Frédéric -- Frédéric de Villamil What's mine is mine. What's yours is still unsetteled – Go player proverb frede...@de-villamil.comtel: +33 (0)6 62 19 1337 http://t37.net Typo : http://typosphere.org -- 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 -- 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
Re: [wtr-general] Re: FireWatir: fire_event(onkeypress) returning error message
You may try fire_event(onmouseover) first, then fire_event(ondblclick). Wesley. For life, the easier, the better. On Sat, Jan 30, 2010 at 4:01 AM, tester86 sagar.am...@gmail.com wrote: Can you make it when you click twice? ***.click ***.click I tried .click .click twice on the label, but it did not click on the label. -- After debugging I noticed that when I do $b.element_by_xpath('// label[text()=Research]').click, in fire bug it does click on the label but the watir command does not go to the next page as intended. If I replace the click with a fire_event(ondblclick) as mentioned it just returns 0. Does anyone have any solutions. Thanks -- 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 -- 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
Re: [wtr-general] Re: popup handling
How do you invoke the method? Wesley. For life, the easier, the better. On Fri, Jan 29, 2010 at 1:51 AM, naveen kumar naveeenku...@gmail.comwrote: Hi , Thanks for your reply, when i tried pop op clicker method it throws error saying nomethod found error how can i rectify this.Please help me in this regard Thanks, Naveen On Fri, Jan 22, 2010 at 6:32 AM, Wesley Chen cjq@gmail.com wrote: If the methods above can't work, you can try the one below. # When it displays the OKCancel or OK pop up, it will click it def popup_clicker(ie = $ie, buttonname= OK) require 'watir/contrib/enabled_popup' hwnd = ie.enabled_popup(15) if(hwnd) #yeah! a popup popup = WinClicker.new popup.makeWindowActive(hwnd) #Activate the window. popup.clickWindowsButton_hwnd(hwnd,buttonname) #Click the button # #popup.clickWindowsButton(/Internet/,buttonname,30) popup=nil end end sth.click_no_wait popup_clicker($b, OK) I submit the one you referred, but I don't know why sometimes it works, sometimes it doesn't. Maybe in the second, it works, in the next second, it doesn't work. For the popup_clicker, I think it is a stable one. Thanks. Wesley Chen. For life, the easier, the better. On Fri, Jan 22, 2010 at 1:37 AM, orde ohil...@gmail.com wrote: I think you need to use click_no_wait on this line: ie.button(:value, 'Click').click Also, lots of info here: http://wiki.openqa.org/display/WTR/Pop+Ups Hope it helps... orde On Jan 21, 9:28 am, Naveen devadass naveeenku...@gmail.com wrote: Hi All, I am using following script to handle the pop up but the code is not woking the code autoit.Send({Enter}) is not working .it doesnot send the key strokes properly please help me in this regard or please give me some other options to handle the pop up effectively.currently i am using watir 1.6.2 require 'watir' require 'win32ole' require 'watir/dialog' require 'watir/winClicker' require 'watir/contrib/enabled_popup' # MAIN APPLICATION CODE link = '\\\hcl0203\Release 3\Automated Testing\popups Handling \Sampl1.html' ie = Watir::IE.start(link) ie.button(:value, 'Click').click def check_for_popups(title, button) popup=Thread.new { autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(title,,5) if (ret==1) autoit.WinActivate(title) button.downcase! if button.eql?(ok) || button.eql?(yes) || button.eql? (continue) autoit.Send({Enter}) else autoit.Send({tab}) autoit.Send({Enter}) end elsif (ret==0) puts No popup, please check your code. end } at_exit { Thread.kill(popup) } end check_for_popups(, OK) -- 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 -- 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 -- ever friendly, Naveen -- 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 -- 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
Re: [wtr-general] Re: FireWatir: fire_event(onkeypress) returning error message
Can you make it when you click twice? ***.click ***.click Wesley. For life, the easier, the better. On Fri, Jan 29, 2010 at 12:04 AM, tester86 sagar.am...@gmail.com wrote: Try this: fire_event(ondblclick) There is a label on the page and I have to double click on that label in order to go to the next page. I can get to the label by: $b.element_by_xpath('//label[text()=Research]').fire_event (onmousedown) - this will select the label then in order to get to the next page I have to double click on the label several time (found this out while testing it manually) For the double click I used: $b.element_by_xpath('//label[text()=Research]').fire_event (ondblclick) in irb it returns 0 Is there any other way that I can perform an action to double click twice on the label so it take me to the next page. Thanks -- 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 -- 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
Re: [wtr-general] Firewatir rpxnow
Why do you add the underline between not and you? If you want to skip the '?', you have to regular expression, like: ff.link(:class, /not you/).exists? Thanks. Wesley Chen. For life, the easier, the better. On Tue, Jan 26, 2010 at 9:20 PM, Gimle toni.k.aittoni...@gmail.com wrote: Hello all. I have a question regarding accessing the elements in remote-javascript generated content on a page. It would appear that these created elements are not accessible with firewatir at all. I tried both tagged elements and xpath, but no matches for elements within rpxnow's javascript-generated content can be found. Example : RPX now's not you? link ff.link(:class, not_you).exists? # -- should return true, but doesn't ff.span(:text, not you?).exists? # -- also false ff.link(:xpath, //a...@class='not_you']/span).exists? # -- Doesn't return true ff.link(:xpath, //a...@class='not_you']/).exists? # -- jSSH doesn't like this formatting on an xpath Is this a known problem, or am I just not doing it right? I am using Ruby 1.8.6 via Netbeans 6.8, Firewatir 1.6.5 and Firefox 3.0.17 -Toni -- 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 -- 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
Re: [wtr-general] how to click on a row in a table
Two different ways you can make it. You can use *index*: $b.cell(:class =user-column, :index =the text's index).click You can use *text*: $b.cell(:class =user-column, ::text=the text you want to click).click Expect it helps. Thanks. Wesley Chen. For life, the easier, the better. On Thu, Jan 21, 2010 at 5:54 PM, raju rajudvsn...@yahoo.co.in wrote: k on a row in a table -- 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
Re: [wtr-general] Getting undefined method when trying to check a checkbox
The problem is on nil:NilClass It means the script can't find the browser you have defined. Thanks. Wesley Chen. For life, the easier, the better. On Thu, Jan 21, 2010 at 4:50 AM, QAguy qablogm...@gmail.com wrote: I'm using safariwatir. I am trying to set a checkbox using the following: browser.checkbox(:id, select_all_checkbox).set This should work but is giving me: undefined method `checkbox' for nil:NilClass Code this should work against is: input type=checkbox onclick=MOBX.Folders.selectDeselectAll() value=1 id=select_all_checkbox Can someone provide some insight? Thanks in advance. QAguy -- 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 -- 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
Re: [wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time
You get that error message: NoMethodError: undefined method `text_field' for nil:NilClass Because the script can't find the browser, have you defined your browser?* require 'watir' require 'watir/testcase' class TestXXX Watir::TestCase def test_setup $b = Watir::IE.start(your url) end def test_set_value $b.text_field(:name, username).set(user1) $b.text_field(:name, password).set(X) $b.link(:id, button1).fire_event(onMouseDown) * * $b.link(:id, button1).fire_event(**onMouseUp)* * end def test_tear_down $b.close end end* Thanks. Wesley Chen. For life, the easier, the better. On Tue, Jan 19, 2010 at 10:23 PM, tester86 sagar.am...@gmail.com wrote: Welsey, I changed my script according to what you mentioned above. When I run it in IE I get the following error message: NoMethodError: undefined method `text_field' for nil:NilClass All I am trying to do is to login to an application: $b.text_field(:name, username).set(user1) $b.text_field(:name, password).set(X) $b.link(:id, button1).fire_event(onMouseDown) $b.link(:id, button1).fire_event(onMouseUp) Any Idea's since when I run my scripts in IE I seem to get error message like that for different things i.e. text field and links Thanks On Jan 15, 8:41 pm, Wesley Chen cjq@gmail.com wrote: You may change *Class TestGoogle Test::Unit::TestCase* to *class TestGoogle Watir::TestCase* And *require 'watir' require 'watir/testcase'* Thanks. Wesley Chen. For life, the easier, the better. On Sat, Jan 16, 2010 at 5:35 AM, Bill Agee billa...@gmail.com wrote: Can you post the complete backtrace? I bet the method test_entertext is being run before test_start. If I remember correctly, Test::Unit runs the methods inside a test class in asciibetical order. You might want to collapse all three of those methods into one. There's probably no real gain in having them be separated. On Fri, Jan 15, 2010 at 11:31 AM, tester86 sagar.am...@gmail.com wrote: Hi Please note that this is an example of what tests. Class TestGoogle Test::Unit::TestCase def test_start() $b=Watir::Browser.start(https://www.google.com;) end def test_entertext() $b.text_field(:name, SearchField).set(Search) $b.button(:name, btnG).click end def test_verify() if $b.contains_text(Search) puts passed else puts failed end end end In my options.yml if I tell it to run with IE then in command prompt I get the error $b is not 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 -- 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- 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 -- 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
Re: [wtr-general] Re: How to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5
I use netbeans editor, it works. If you use different editor, please make sure the character set is right in the editor settings. Thanks. Wesley Chen. For life, the easier, the better. On Tue, Jan 19, 2010 at 7:32 PM, jnxgn s...@jnxgn.cn wrote: Thanks a lot, I had tried before but it did not work. On 1月19日, 上午10时45分, Wesley Chen cjq@gmail.com wrote: Try: $ie.text_field(:name, keyword).value = 你好 I have not replaced anything. Thanks. Wesley Chen. For life, the easier, the better. On Tue, Jan 19, 2010 at 12:11 AM, jnxgn s...@jnxgn.cn wrote: I cannot figure out how to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5, I tried to change the encoding of the .rb file and the encoding of the firefox browser, but failed. require ‘rubygems’ require ‘firewatir’ ff = FireWatir::Firefox.new ff.goto “http://www.google.com“ sleep 1 ff.text_field(:name, ‘q’).set('电') For Watir 1.6.5, the Chinese charaters can be supported by replacing the script WIN32OLE.codepage = WIN32OLE::CP_UTF8 with WIN32OLE.codepage = WIN32OLE::CP_ACP in the file of C:\Ruby\lib\ruby \gems\1.8\gems\watir-1.6.5\lib\watir\win32ole.rb -- 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- 隐藏被引用文字 - - 显示引用的文字 - -- 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 -- 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
Re: [wtr-general] Re: Not able to access Dojo controls
I think the code you provided above is not enough. When I paste the code to my local, open it with my IE, I can't see anything. Have you got a public website with the html code? For this kind of location, I think it is not difficult. Thanks. Wesley Chen. For life, the easier, the better. On Mon, Jan 18, 2010 at 4:43 PM, Betsy joybe...@gmail.com wrote: ie.frame(:index,1).frame(:index,1).text_field(:xpath,//form [...@id='stockEnq_loadDetails']/inp...@name='input FromDate']).flash -- 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
Re: [wtr-general] How to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5
Try: $ie.text_field(:name, keyword).value = 你好 I have not replaced anything. Thanks. Wesley Chen. For life, the easier, the better. On Tue, Jan 19, 2010 at 12:11 AM, jnxgn s...@jnxgn.cn wrote: I cannot figure out how to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5, I tried to change the encoding of the .rb file and the encoding of the firefox browser, but failed. require ‘rubygems’ require ‘firewatir’ ff = FireWatir::Firefox.new ff.goto “http://www.google.com“ sleep 1 ff.text_field(:name, ‘q’).set('电') For Watir 1.6.5, the Chinese charaters can be supported by replacing the script WIN32OLE.codepage = WIN32OLE::CP_UTF8 with WIN32OLE.codepage = WIN32OLE::CP_ACP in the file of C:\Ruby\lib\ruby \gems\1.8\gems\watir-1.6.5\lib\watir\win32ole.rb -- 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 -- 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
Re: [wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time
You may change *Class TestGoogle Test::Unit::TestCase* to *class TestGoogle Watir::TestCase* And *require 'watir' require 'watir/testcase'* Thanks. Wesley Chen. For life, the easier, the better. On Sat, Jan 16, 2010 at 5:35 AM, Bill Agee billa...@gmail.com wrote: Can you post the complete backtrace? I bet the method test_entertext is being run before test_start. If I remember correctly, Test::Unit runs the methods inside a test class in asciibetical order. You might want to collapse all three of those methods into one. There's probably no real gain in having them be separated. On Fri, Jan 15, 2010 at 11:31 AM, tester86 sagar.am...@gmail.com wrote: Hi Please note that this is an example of what tests. Class TestGoogle Test::Unit::TestCase def test_start() $b=Watir::Browser.start(https://www.google.com;) end def test_entertext() $b.text_field(:name, SearchField).set(Search) $b.button(:name, btnG).click end def test_verify() if $b.contains_text(Search) puts passed else puts failed end end end In my options.yml if I tell it to run with IE then in command prompt I get the error $b is not 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 -- 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 -- 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
Re: [wtr-general] Re: XPath Support in Frame
I think the xpath is not supported when in a frame. Thanks. Wesley Chen. For life, the easier, the better. On Thu, Jan 14, 2010 at 10:04 PM, Kunal kunal...@gmail.com wrote: Hi Angrez, Do you think this issue can be solved ? -Kunal On Jan 11, 12:33 pm, Wesley Chen cjq@gmail.com wrote: I met with this kind of problem, too. In fact, when I user IE developer toolbar to access the web page with the source code above, the IFRAME won't expand. The IFrame is with src attributes, it points to the other place, which crosses the domain, so we have no access. Thanks. Wesley Chen. For life, the easier, the better. On Mon, Jan 11, 2010 at 2:36 PM, Angrez Singh ang...@gmail.com wrote: Thanks a lot for the HTML source .. it is sufficient. Will look into the issue and resolve it. - Angrez 2010/1/9 Kunal kunal...@gmail.com Well, the HTML doc is quite big! You would not want to dig into that ;) Anyways I tried to remove most of the redundant things and the skeleton HTML does look something like as below html head /head body div Some content here /div iframe src=http://dummy-url; html body div id=test-1 Test test div id=test-2 /div span id=test-span-1 lkdsjlakjds /span span id=Root-Node /span /div /body /html /iframe /body /html If this helps, great. If you need more information, please let me know. -Kunal On Jan 9, 6:48 pm, Angrez Singh ang...@gmail.com wrote: I'll look into this .. above should work .. meanwhile can you send me the HTML you are using? - Angrez On Sat, Jan 9, 2010 at 3:18 PM, Kunal kunal...@gmail.com wrote: No. They don't. See the error which I get, If I try to do something like that. irb(main):025:0 browser.frame( :id, test-339 ).span( :xpath, //span [...@text='Root Node'] ).focus NoMethodError: undefined method `element_by_xpath' for #Watir::Frame: 0x32f24f4 from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ non_control_elements.rb:20:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:49:in `assert_exists' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:266:in `focus' from (irb):25 On Jan 8, 3:45 pm, Angrez Singh ang...@gmail.com wrote: Correct as Željko said it should work? On Fri, Jan 8, 2010 at 3:59 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Jan 8, 2010 at 11:15 AM, Kunal Kumar kunal...@gmail.com wrote: $ie.frame(:index, 3).span( :xpath, //d...@id='test']/../span ).click would fail with error. That should work. What error do you get? Take a look: http://wiki.openqa.org/display/WTR/XPath ...you can access frames using the attributes that Watir provides but you can't use *xpath* attribute for accessing frames... Željko -- watir.com - community manager watirpodcast.com - host -- 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 -- 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 -- 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 -- You received this message
Re: [wtr-general] Driving Watir scripts in IE and Firefox at the same time
First, I think there is something wrong in your script. 1. You use ie for both ie browser and FF browser; 2. Your Firefox invoke way is not right. I think it works if you use: *require 'watir' ie = Watir::IE.new ie.goto(www.google.com) ff = FireWatir::Firefox.new ff.goto(www.google.com)* Thanks. Wesley Chen. For life, the easier, the better. On Mon, Jan 4, 2010 at 11:03 PM, tester86 sagar.am...@gmail.com wrote: Hi From my research as far as I understand you can not drive watir scripts at the same time in the browser unless you create seperate scripts for them. I have a Test::Unit script that runs in Firefox but when I specify IE it just opens a new browser and nothing happens. I am guess that I would have to write a different set of code for that. example: ie=Watir::IE.new ie.goto(www.google.com) ie=FireWatir.FireFox.new ie.goto(www.google.com) # then a code to perform search When I run a script like this it only performs the search in Firefox and not in IE. Is ther any solution to execute against both browsers. Thanks -- 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 -- 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
Re: [wtr-general] Re: Inputting text into a search field that has no input button
$ie.send_keys({ENTER}) Thanks. Wesley Chen. For life, the easier, the better. On Tue, Jan 5, 2010 at 6:22 AM, xguarder shams...@gmail.com wrote: Thanks, it looks like it is indeed a JS event. However, none of the fire_events I have tried seems to be working. Is there a JS event name that is associated with just sending an Enter command to it? Thanks again! On Jan 4, 4:21 pm, Tiffany Fodor tcfo...@comcast.net wrote: Hi! Check your text field to see if there is a javascript event associated with it. If there is, you can fire it with: ie.text_field(:name, 'my_field').fire_event('my_js_event') Hope this helps! -Tiffany On Jan 4, 1:46 pm, xguarder shams...@gmail.com wrote: I am trying to enter text into a search field (textField box). However, there is no button to click on to submit the text. You need to hit enter after typing it into the text box. Any ideas on how I can send the ENTER command directly to the textbox itself? I tried using the send_keys method, but it ends up sending the command to the entire browser itself, not the text field. Thanks in advance! -- 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 -- 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
Re: [wtr-general] Re: How to write code for button click?
You're welcome. I think you need study more about the basic stuff about Watir. For your question above, it is a link in a CSS, when you view the source, you should have known that it is a link, rather than a button. Wish you will realize the powerful of Watir and Ruby. Thanks. Wesley Chen. For life, the easier, the better. On Sun, Jan 3, 2010 at 2:28 PM, Shaiful Islam jshai...@gmail.com wrote: Thank you very much, I appreciate your rapid response with exact solution. It works like magic. Thanks again. On Jan 2, 6:31 pm, Wesley Chen cjq@gmail.com wrote: $ie.link(:href, javascript: void(0)).click or $ie.link(:text, Auto Complete).click Thanks. Wesley Chen. For life, the easier, the better. On Sat, Jan 2, 2010 at 1:43 PM, Shaiful Islam jshai...@gmail.com wrote: Hello All, I am learning Watir and implementing it one of my project. I have done few things to execute. But I gotta stuck over the form submission for this code: a class=greenArrow onclick=T.FF.SV2.autocompleteTeam() href=javascript: void(0)Auto Complete/a other place i used for form submission: b.button(:type, 'submit').click Anyone can help on this. Thanks in Advance. -- 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 -- 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 -- 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
Re: [wtr-general] How to write code for button click?
$ie.link(:href, javascript: void(0)).click or $ie.link(:text, Auto Complete).click Thanks. Wesley Chen. For life, the easier, the better. On Sat, Jan 2, 2010 at 1:43 PM, Shaiful Islam jshai...@gmail.com wrote: Hello All, I am learning Watir and implementing it one of my project. I have done few things to execute. But I gotta stuck over the form submission for this code: a class=greenArrow onclick=T.FF.SV2.autocompleteTeam() href=javascript: void(0)Auto Complete/a other place i used for form submission: b.button(:type, 'submit').click Anyone can help on this. Thanks in Advance. -- 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 -- 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
Re: [wtr-general] Error in installation of gem
Watir latest version is 1.6.5. Please don't use Watir1.5.4. Thanks. Wesley Chen. For life, the easier, the better. 2009/12/30 lu.hr2009 lu.hr2009 lu.hr2...@gmail.com thread name can i have it ,thank you. watir-1.5.4.gem have downloaded,it can help me ? 2009/12/29 Wesley Chen cjq@gmail.com It is a different topic, please open a new thread. Please see the doc: http://wiki.openqa.org/display/WTR/Installation And then try again. Thanks. Wesley Chen. For life, the easier, the better. 2009/12/29 lu.hr2009 lu.hr2009 lu.hr2...@gmail.com hi I am trying to install watir in my PC. while I am running the command gem update --system or gem install watir It always throws following error ERROR: While executing gem ... (OptionParser::AmbiguousOption) ambiguous option: -system because my company hava domain manager. how to resolve it,thank you! 2009/12/9 chethan sarathy chethan2...@yahoo.co.in H I All, Here is the solution for Ruby Installation Updating the Gems. Pls read this article for more info http://rubyforge.org/forum/forum.php?forum_id=35591 Steps: - Find the New Ruby Installer 186-27_rc2.exe. in http://rubyforge.org/frs/?group_id=167 - Install the same (run the command ruby -v some times it throws error in that case uninstall install again). - Run gem update (earlier gem update --system doesn't work). - Run gem install watir. Done. This will start running Watir :) Thanks to Shivananda gemcutter google group for all the help they extended. Cheers, Chethan -- The INTERNET now has a personality. YOURS! See your Yahoo! Homepagehttp://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.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 -- 善待自己,相信自己,好运常伴自己! -- 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 -- 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 -- 善待自己,相信自己,好运常伴自己! -- 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 -- 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
Re: [wtr-general] Re: How to wait following an external frame link click.
If you use IE, please try: Watir::Waiter.wait_until{$ie.link(:text, Test copy listing #{$listing.listing_id}).exists?} This wait will at most last for 60 seconds. If you want to wait for more time, please turn to* watir.rb* to change the *@@default_timeout = 60.0* to more; If you use firefox, please turn to *firefox.rb*, wait method, *def wait(last_url = nil) #puts In wait function isLoadingDocument = start = Time.now while isLoadingDocument != false isLoadingDocument = js_eval(#{browser_var}=#{window_var}.getBrowser(); #{browser_var}.webProgress.isLoadingDocument;) #puts Is browser still loading page: #{isLoadingDocument} # Raise an exception if the page fails to load if (Time.now - start) 300 raise Page Load Timeout end end* change the 300 in red to 420. I have ever tried that in FF, it works. I wait for two hours until a stuff load in FF3.5. Thanks. Wesley Chen. For life, the easier, the better. On Wed, Dec 16, 2009 at 2:13 PM, bender25 zuzi...@yahoo.com wrote: page does many refreshes / loa -- 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
Re: [wtr-general] Can Watir copy the info in Div?
No different between text and innerText, they are the same, as if just alias. Thanks. Wesley Chen. For life, the easier, the better. On Wed, Dec 16, 2009 at 5:31 PM, Yuping Zhong littlezhong...@gmail.comwrote: How to print it out?I want to print it in the Terminal. For* Wesley Chen:* Is it different to deal with *text and **innerTex?* * * *If true,how?* * * On Wed, Dec 16, 2009 at 5:06 PM, Wesley Chen cjq@gmail.com wrote: :), I think it is *text *or *innerText*, is *Text *OK? Thanks. Wesley Chen. For life, the easier, the better. On Wed, Dec 16, 2009 at 2:48 PM, LiShu sub...@gmail.com wrote: $ie.div(:id,AA).Text On Wed, Dec 16, 2009 at 2:17 PM, Yuping Zhong littlezhong...@gmail.comwrote: Hi, I want to fetch the info in the Div and then print it out,is possible to to do that? If so,can someone tell me how to do? Such as, div id=AA Watir is a good tool. /div How to copy Watir is a good tool and then puts out? Thanks! -Zhong -- 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 -- 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 -- 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 -- 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 -- 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
Re: [wtr-general] Re: Get unexpected error message when use Excel as report.
:), thank you, Tiffany, I check my gem local list, I found all the gems version are newer than yours. I always update them and uninstall the old version. Thanks. Wesley Chen. For life, the easier, the better. On Sun, Dec 6, 2009 at 8:53 AM, Tiffany Fodor tcfo...@comcast.net wrote: Oops, sorry about that - I meant the win32-api gem. Actually, I just checked to see what I have and I have a boatload of windows gems: win32-api (1.4.0, 1.1.0, 1.0.6) win32-clipboard (0.4.1) win32-dir (0.3.1) win32-eventlog (0.4.3) win32-file (0.5.3) win32-file-stat (1.2.3) win32-process (0.6.0, 0.5.9, 0.5.8, 0.5.1) win32-sapi (0.1.3) win32-sound (0.4.0) windows-api (0.3.0, 0.2.3) windows-pr (1.0.2, 0.8.7, 0.8.5, 0.6.2) -Tiffany On Dec 5, 5:49 pm, Tiffany Fodor tcfo...@comcast.net wrote: Hey Wesley! Since you're not getting an error that says there is no method 'range' for a nil value, it doesn't seem your problem is data related. Have you tried re-installing the Win32ole gem? (just a guess) -Tiffany On Dec 5, 1:17 am, Wesley Chen cjq@gmail.com wrote: Thanks, Ethan, I have searched a lot in google. I just want to ask anybody who has met this kind of problem. I think in the group, there are many experts who are good at excel class. Thanks. Wesley Chen. For life, the easier, the better. On Sat, Dec 5, 2009 at 3:36 PM, Ethan notet...@gmail.com wrote: Does this have anything to do with Watir? @worksheet seems to be a win32ole corresponding to something in excel, which isn't what watir deals with. it's not very clear from the code snippet (and screenshots of code are not a good way to convey information - just copy and paste) what this is, but it doesn't appear to be using watir. If this same script was working before, my only advice is the usual stuff to try of rebooting, reverting any changes to the system that have been made, and googling the error code to see if any results look informative. http://www.google.com/search?q=800a01a8 On Sat, Dec 5, 2009 at 02:13, Wesley Chen cjq@gmail.com wrote: The report always runs OK before, but today, it displays unexpected error message as below: *E:/NetbeansProjects/qa-test-scripts/Coach tool/training/Workout/../../../lib/reporting.rb:178:in `method_missing': range (WIN32OLERuntimeError) OLE error code:0 in Unknown No Description HRESULT error code:0x800a01a8* The method is as below: *def pages_visited() url_cleanup() i = 0 @worksheet.range(d+ (10+total_tests()).to_s)['Value'] = [Pages Visited] @worksheet.range(d+ (10+total_tests()).to_s).HorizontalAlignment = WIN32OLE::XlCenter @worksheet.range(d+ (10+total_tests()).to_s).Interior['ColorIndex'] = 11 @worksheet.range(d+ (10+total_tests()).to_s).Font['ColorIndex'] = 2 @worksheet.range(d+ (10+total_tests()).to_s).Font.Bold = true @urls.each do |page| @worksheet.range(d+ (i+11+total_tests()).to_s).Value = [page] i += 1 end end* Please see the two pictures attached for details. code.png means the code; ouput.png means the output result. The output result is as expected. Thanks. Wesley Chen. For life, the easier, the better. -- 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 -- 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 -- 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 -- 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
Re: [wtr-general] Re: select_item_in_select_list no longer working as expected
Why don't you use: $ie.select_list(...).set($ie.select_list(...).getAllContents[2]) Thanks. Wesley Chen. For life, the easier, the better. On Tue, Nov 24, 2009 at 11:58 PM, James jgcpal...@gmail.com wrote: Well, I sort of resolved my own issue by using getAllContents and then selecting a value from that array. Unfortunately, this means if there are multiple options with the same value, there is no way to pick any of these duplicate options except the first. Anyone have any idea how to get around this? Say for example I have a dropdown where all options are the same. How do I pick, say, the 3rd option in the dropdown? Thanks, James On Nov 23, 4:43 pm, James jgcpal...@gmail.com wrote: Never mind that last post, it wasn't returning what I thought I was returning. It looks like I'm running watir 1.6.5. On Nov 23, 4:39 pm, James jgcpal...@gmail.com wrote: Perhaps this is related, or I'm just interpretting it wrong, but if I do: gem -v watir it returns: 1.3.5 Isn't the newest watir at version 1.6.5? If I try to update watir, it tells me there's nothing to update. Thanks, James On Nov 23, 3:52 pm, James jgcpal...@gmail.com wrote: My computer crashed and I had to reinstall ruby and watir. I used to be able to use a command like this: browser.select_list(:id, 'mydropdownbox').select_item_in_select_list (:index, 3) Now, if I do this, every item in the select box gets highlighted, and I get the error: Watir::Exception::NoValueFoundException in 'XXX' No option with :index of 3 in this select element ./test/specs/clicker_spec.rb:359: ./test/specs/clicker_spec.rb:358:in `each' ./test/specs/clicker_spec.rb:358: What's going on? Did something change with this method? Is there something I need to change in my code so that it can select items in a select list based on index? Thanks, James --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- -- 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] What's the difference between FireWatir1.6.5 and Watir1.6.5
Hi, Guys, It is a great news that FireWatir1.6.5 is released. I tried the attach and enumerate methods, that's perfect. I have seldom used FireWatir before this release 1.6.5. My project runs quite well in Watir in IE. So, I would like to ask a question. What's the difference between FireWatir and Watir? I don't ask for the inner core structure, but the difference about identify the elements on the web page, such as JS pop up, buttons, new window... Anything that FireWatir is beyond Watir? funfx? Anything FireWatir is still under construction? Any ideas would be quite appreciated. Thanks. Wesley Chen. For life, the easier, the better. --~--~-~--~~~---~--~~ 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: What's the difference between FireWatir1.6.5 and Watir1.6.5
Sorry for the question. I should have read the doc below: http://wiki.openqa.org/display/WTR/Firewatir+Compatibility Thanks. Wesley Chen. For life, the easier, the better. On Wed, Nov 11, 2009 at 10:36 AM, Wesley Chen cjq@gmail.com wrote: Hi, Guys, It is a great news that FireWatir1.6.5 is released. I tried the attach and enumerate methods, that's perfect. I have seldom used FireWatir before this release 1.6.5. My project runs quite well in Watir in IE. So, I would like to ask a question. What's the difference between FireWatir and Watir? I don't ask for the inner core structure, but the difference about identify the elements on the web page, such as JS pop up, buttons, new window... Anything that FireWatir is beyond Watir? funfx? Anything FireWatir is still under construction? Any ideas would be quite appreciated. Thanks. Wesley Chen. For life, the easier, the better. --~--~-~--~~~---~--~~ 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: capturing the link on div
I think you have to study the Watir guide. Solution 1: $ie.divs.collect {|div| if div.class_name == mydata puts div.text end } Solution 2: $ie.lis.collect {|li| puts li.div(:index, 1).text } Thanks. Wesley Chen. For life, the easier, the better. On Mon, Nov 9, 2009 at 6:32 PM, Soori sure...@gmail.com wrote: Thanks Frédéric de Villamil for the quick response. I would also like to capture the text on the div as shown below. the code is something like this, div class=test_container id=mytest-data li div class=mydata encoded=iudasfhakASDa= onselectstart=return false;TEST DATA1/div div class=my_options id=my_options_1 /div div class=clear_float/div /li li div class=mydata encoded=dsfsfsfs98fdfdd= onselectstart=return false;TESTDATA2/div div class=my_options id=my_options_1 /div div class=clear_float/div /li li div class=mydata encoded=sdfsfsfs980sdfss= onselectstart=return false;TESTDATA3/div div class=my_options id=my_options_1 /div div class=clear_float/div /li I would like to capture the TESTDATA1, TESTDATA2, etc from the div through the script. Your help would be appreciated. Thanks again /Soori On Nov 9, 2:05 pm, de Villamil Frédéric fdevilla...@gmail.com wrote: Le 9 nov. 2009 à 10:01, Soori a écrit : Hi All, I would like to capture all the links under a particular div class. could you please help me in this front.? Thanks Soori Hello soori, You should use the links method as a sub element of your div (read the doc Luke). Should be something like this: @browser.div(:class /yourclass/).links.each do |link| some code here... end Regards -- Frédéric de Villamil What's mine is mine. What's yours is still unsetteled – Go player proverb frede...@de-villamil.comtel: +33 (0)6 62 19 1337 http://t37.net Typo : http://typosphere.org --~--~-~--~~~---~--~~ 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 Help
That's funny. Thanks. Wesley Chen. For life, the easier, the better. On Tue, Nov 10, 2009 at 5:15 AM, Ethan notet...@gmail.com wrote: Somebody seems to be stealing all of your letters 'a'. Watir needs these, otherwise it's just 'wtir', and lacking the 'application' part can't do anything. I suggest you hire a privte detective to track down where all of your 'a's are disappearing to. The police are no help with this sort of thing - they have no 'a' in their name, and don't care. On Mon, Nov 9, 2009 at 15:29, tester86 sagar.am...@gmail.com wrote: Using cucumber and watir - Vista and Windows 7 Get the following error message: Unble to locte element, using :nme, q (Wtir::Exception::UnknownObjectException) ./fetures/step_definitions/serch_steps.rb:11:in `/I serch for (.*)/'fetures/serch.feture:8:in `When I serch for cucumber github' Then I should see BDD tht tlks to domin experts first nd code second # fet ures/step_definitions/serch_steps.rb:15 Anyone have any basic watir scripts that I can use with cucumber --~--~-~--~~~---~--~~ 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: How to get html meta details
But I can't access the URL: http://bit.ly/4mDHoJ How can I make it? Thanks. Wesley Chen. For life, the easier, the better. On Tue, Nov 3, 2009 at 4:42 PM, Raveendran P jazzezr...@gmail.com wrote: Hi Marlon, welcome ... ! On Tue, Nov 3, 2009 at 1:11 PM, Marlon marlonmoja...@gmail.com wrote: Hi Raveendran, I was able to get what I want. For now im going to use it. thanks lot for helping! marlon -- Regards, P.Raveendran http://raveendran.wordpress.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: How to get html meta details
Thank you very much. Only this way to get the meta data? I think it is not convenient enough. Thanks. Wesley Chen. For life, the easier, the better. On Tue, Nov 3, 2009 at 10:41 PM, chandu.tennety chandu.tenn...@gmail.comwrote: Marlon, Your original code works for me: {Content-Type=text/html; charset=iso-8859-1, keywords=title} Chandu On Nov 2, 10:51 pm, Marlon marlonmoja...@gmail.com wrote: I found the part of the solution herehttp:// groups.google.com/group/watir-general/browse_thread/thread/566... it still did not solve my problem. *sample html* html head titletitle/title meta content=title name=keywords/ meta content=text/html; charset=iso-8859-1 http-equiv=Content-Type/ *ruby file* require 'watir' require 'test/unit' class TC_MyTest Test::Unit::TestCase def test_meta_get $ie = Watir::IE.start('url to check') d=meta($ie) puts d end def meta( browser ) meta = {} bmeta = browser.document.body.parentElement.getElementsByTagName( META ) bmeta.each do |i| k = i.name if k == k = i.httpEquiv end meta[ k ] = i.content end return meta end end this produces: Content-Typetext/html; charset=iso-8859-1title keywords I what to be able to get first meta tag name attribute which is *keywords * many thanks again! Marlon --~--~-~--~~~---~--~~ 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: How convenient, quick to find and locate elements on the page
I think you have to go to Watir official website, it introduces the basic knowledge about how to locate. If you use IE, please download IEdeveloper toolbar plugin; If you use FF, please use firebug. Thanks. Wesley Chen. For life, the easier, the better. On Sun, Nov 1, 2009 at 12:39 PM, wangbotian iamhappypri...@gmail.comwrote: HI,all: I am a new user of watir ,and I want to develop script to autotest a website,However, more complex page structure and elements, elements more difficult to find, may I ask whether there are some tools to quickly find or locate elements on the page --~--~-~--~~~---~--~~ 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: Data driven framework using SQL database
Yes, it works, but I have to change Uid as User ID, Pw as password. Thanks. Wesley Chen. For life, the easier, the better. On Fri, Oct 30, 2009 at 4:53 PM, SMF SMF shaikm.fi...@gmail.com wrote: Hi Pritam, No problem. Could you please do one favor, can you post the steps/configuration you followed to connect to database that will helpful to others also. Thanks, smf On Fri, Oct 30, 2009 at 1:58 PM, Pritam pmaha...@gmail.com wrote: Hi, Thank you very much.now am able to connect to the database and retrieve the data... Thanks again. On Oct 30, 12:25 pm, SMF SMF shaikm.fi...@gmail.com wrote: you have to download the dbi files and configure them on your machine. On Fri, Oct 30, 2009 at 12:30 PM, Pritam pmaha...@gmail.com wrote: Hi, Thank you for your reply. I have executed the code that you have given, but i got the following error. C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:368:in `load_driver': Could not load driver (no such file to load -- C:/Ruby/lib/ruby/site_ruby/1.8/ dbd/ADO) (DBI::InterfaceError) from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:233:in `_get_full_driver' from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:219:in `connect' from database.rb:5 I went to the location(C:/Ruby/lib/ruby/site_ruby/1.8/dbd/) as indicated in the error, and could find only find ODBC and Proxy folders and not ADO. Do i need to download and copy the ADO.rb file in this location in order to access the SQL database? If yes, where can i find this file... Thanks in advance On Oct 29, 4:56 pm, SMF SMF shaikm.fi...@gmail.com wrote: Hi Pritam, Answer to your *question 1.* require 'dbi' DB = Provider=SQLOLEDB.1;Server=servername;Database=DBname;Uid=userid;Pw=password sql = select LoginID from Login WHERE UserName ='xyz' DBI.connect(DBI:ADO:#{DB}) do | dbh | dbh.select_all( sql ) do |row| puts row[0] # the first field #puts row[1] # the second field end end No idea, about framework or architecture Thanks On Thu, Oct 29, 2009 at 5:03 PM, Pritam pmaha...@gmail.com wrote: Hi guys, I am new to ruby programming, and I need help in developing data driven framework which uses sql database for retrieving data. I have seen a lot of examples over internet which showed how to do it using excel and open source applications. To start with I need information for the following. 1. How to connect to a sql database using ruby/watir scripts? 2. What sought of architecture am I looking for? Thanks in advance. --~--~-~--~~~---~--~~ 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: Data driven framework using SQL database
If the sql server port is not the default one 1433, how can we set it? In the connect string, can we set any other attribute? On 10/30/09, Wesley Chen cjq@gmail.com wrote: Yes, it works, but I have to change Uid as User ID, Pw as password. Thanks. Wesley Chen. For life, the easier, the better. On Fri, Oct 30, 2009 at 4:53 PM, SMF SMF shaikm.fi...@gmail.com wrote: Hi Pritam, No problem. Could you please do one favor, can you post the steps/configuration you followed to connect to database that will helpful to others also. Thanks, smf On Fri, Oct 30, 2009 at 1:58 PM, Pritam pmaha...@gmail.com wrote: Hi, Thank you very much.now am able to connect to the database and retrieve the data... Thanks again. On Oct 30, 12:25 pm, SMF SMF shaikm.fi...@gmail.com wrote: you have to download the dbi files and configure them on your machine. On Fri, Oct 30, 2009 at 12:30 PM, Pritam pmaha...@gmail.com wrote: Hi, Thank you for your reply. I have executed the code that you have given, but i got the following error. C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:368:in `load_driver': Could not load driver (no such file to load -- C:/Ruby/lib/ruby/site_ruby/1.8/ dbd/ADO) (DBI::InterfaceError) from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:233:in `_get_full_driver' from C:/Ruby/lib/ruby/site_ruby/1.8/dbi.rb:219:in `connect' from database.rb:5 I went to the location(C:/Ruby/lib/ruby/site_ruby/1.8/dbd/) as indicated in the error, and could find only find ODBC and Proxy folders and not ADO. Do i need to download and copy the ADO.rb file in this location in order to access the SQL database? If yes, where can i find this file... Thanks in advance On Oct 29, 4:56 pm, SMF SMF shaikm.fi...@gmail.com wrote: Hi Pritam, Answer to your *question 1.* require 'dbi' DB = Provider=SQLOLEDB.1;Server=servername;Database=DBname;Uid=userid;Pw=password sql = select LoginID from Login WHERE UserName ='xyz' DBI.connect(DBI:ADO:#{DB}) do | dbh | dbh.select_all( sql ) do |row| puts row[0] # the first field #puts row[1] # the second field end end No idea, about framework or architecture Thanks On Thu, Oct 29, 2009 at 5:03 PM, Pritam pmaha...@gmail.com wrote: Hi guys, I am new to ruby programming, and I need help in developing data driven framework which uses sql database for retrieving data. I have seen a lot of examples over internet which showed how to do it using excel and open source applications. To start with I need information for the following. 1. How to connect to a sql database using ruby/watir scripts? 2. What sought of architecture am I looking for? Thanks in advance. -- Sent from my mobile device Thanks. Wesley Chen. For life, the easier, the better. --~--~-~--~~~---~--~~ 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 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?hl=en -~--~~~~--~~--~--~---
[wtr-general] Re: Navigating to parent
Please try: element(:xxx, 'xxx').parent.element(:yyy, 'yyy') Thanks. Wesley Chen. For life, the easier, the better. On Fri, Oct 30, 2009 at 9:09 AM, Jeff Fry jeff@gmail.com wrote: Hey all, Remind me, is there a way in watir to navigate to the parent of an element? I'm thinking of something like: #find text_field where value matches /foo/, go up to the tr that contains it, and then within that tr click on the first li browser.text_field(:value = /foo/).row(:parent).li(:index = 1).click I made up the .row(:parent) syntax in the above example. I'm just wondering if there's real syntax to do the same thing...or if this is more of a feature request? Cheers, -- Jeff Fry http://testingjeff.wordpress.com http://associationforsoftwaretesting.org --~--~-~--~~~---~--~~ 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 merge: ChromeWatir
That's great news. Expect all the Watir script in IE can also run through in Chromewatir. Thanks. Wesley Chen. For life, the easier, the better. On Fri, Oct 23, 2009 at 7:55 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: for creating the project. --~--~-~--~~~---~--~~ 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: Help required regarding link method
I tried all the methods below, they work: 1. $ie.link(:after?, $ie.image(:title, Photogallerysanity1)).click 2. $ie.link(:after?, $ie.image(:alt, Photogallerysanity1)).click 3. $ie.link(:after?, $ie.image(:src, /s3.amazonaws.com \/staging-brandpotion-prints/)).click 4. $ie.image(:alt, Photogallerysanity1).parent.link(:index, 1).click 5. $ie.image(:alt, Photogallerysanity1).parent.link(:text, Edit).click 6. $ie.image(:alt, Photogallerysanity1).parent.link(:class = underline, :index =1).click We don't need use Xpth here. Thanks. Wesley Chen. For life, the easier, the better. 2009/10/23 Amit Kulkarni amitkkulkarni...@gmail.com Thanks for the help. Following is the page source. body div class=main !-- main -- div class=header-container !-- header -- div class=header div class=actions welcome a href=/profile/nikeman alt=nikeman class=underline onclick=window.open(this.href);return false; title=nikemannikeman/a nbsp;nbsp;nbsp; /div /div /div !-- header close -- div class=content-container !-- content -- div class=content h2 class=titleNikes Active features/h2 div class=tab-layout li class=selectedspan class=Photogallery/span/li /ul div class=tab-content strong class=alert/strong form action=/Nikes/photo_gallery/attachments/delete_multiple method=post div class=dark-underlined-cont h3Photogallery/h3 /div div class=arrow-bar borded div input type=submit class=submit ar-normal title=Delete selected value=Delete selected onclick=if(!validate_delete('input')) { alert('Please select a photo'); return false;} / a href=/Nikes/photo_gallery/attachments/new?media=print class=ar-normal title=Add new photoAdd new photo/a/li /div /div div class=gallery * div style=width:150px;height:150px; input id=attachment[218] name=attachment[218] type=checkbox value=1 / img alt=Photogallerysanity1 src=http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg; title=Photogallerysanity1 / * * a href=/Nikes/photo_gallery/attachments/218/edit?media=print class=underlineEdit/a * /div!-- just for hidden the margin of the last element -- /div /form !-- end form -- /div div class=clear/div !-- clearing content floats important! -- /div /div !-- content close -- /div !-- main close -- /body /html 2009/10/23 Wesley Chen cjq@gmail.com Your this question has taken so much time. I think you still have not described your question clearly enough. For the html code you provided, of course it is easy for us to help you to locate. Please give us the whole page source you failed to locate, and show the error message you got. Thanks. Wesley Chen. For life, the easier, the better. 2009/10/22 Amit Kulkarni amitkkulkarni...@gmail.com Hi Angrez, I tried with the link you provided but it shows below error Unable to locate element, using :xpath, //i...@title='Photogallerysanity']/ (Watir::Exception::UnknownObjectException) Same error appears when i use .click or .flash On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh ang...@gmail.com wrote: can you try this? Browser.link(:xpath,//i...@title='Photogallerysanity']/a).flash() or click() - Angrez On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: I also tried to use using Xpath. i.e. Browser.link(:xpath,//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/).text # = Edit Still no success.Is there something wrong with the above code? On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial You did not answer this. Željko
[wtr-general] Re: Team (was: Sai)
I think, Watir general is a great group, it is kind of because there are many kind men who are generous. I think we won't reject any guys who wants to contribute. We may allow any talent to share their ideas, even if they may leave in seconds. Do you think so? Thanks. Wesley Chen. For life, the easier, the better. On Thu, Oct 22, 2009 at 5:15 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 10:18 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Anybody do not think it would be a good idea? This should be: Anybody thinks it would not be a good idea? Željko --~--~-~--~~~---~--~~ 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: Help required regarding link method
Your this question has taken so much time. I think you still have not described your question clearly enough. For the html code you provided, of course it is easy for us to help you to locate. Please give us the whole page source you failed to locate, and show the error message you got. Thanks. Wesley Chen. For life, the easier, the better. 2009/10/22 Amit Kulkarni amitkkulkarni...@gmail.com Hi Angrez, I tried with the link you provided but it shows below error Unable to locate element, using :xpath, //i...@title='Photogallerysanity']/ (Watir::Exception::UnknownObjectException) Same error appears when i use .click or .flash On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh ang...@gmail.com wrote: can you try this? Browser.link(:xpath,//i...@title='Photogallerysanity']/a).flash() or click() - Angrez On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: I also tried to use using Xpath. i.e. Browser.link(:xpath,//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/).text # = Edit Still no success.Is there something wrong with the above code? On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial You did not answer this. Željko --~--~-~--~~~---~--~~ 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 with Checkbox
You can use $ie.checkbox(:id, /rating\[\d+\]/) Thanks. Wesley Chen. For life, the easier, the better. On Wed, Oct 21, 2009 at 7:02 PM, Amit Kulkarni amitkkulkarni...@gmail.comwrote: Hello, I have this html script. td width=20% input id=rating[65] type=checkbox value=1 name=rating[65]/ a title=Edit Rating href=/Nikes/ratings/65/edit span class=boldRatingsanity1/span /a /td The scenario is i want to click on the checkbox which has title Ratingsanity1. Now here i can tick the checkbox by using the name method but the no. isn't going to be same all the time. I tried following code but still no success. Please help. 1: Browser.checkbox(:after?, Browser.cell(:text, Ratingsanity1)).click --~--~-~--~~~---~--~~ 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: Identifying objects when browser window has no toolbar
Maybe Firebug can. Please try it. Thanks. Wesley Chen. For life, the easier, the better. On Sun, Oct 18, 2009 at 4:10 AM, Alan Baird aba...@bairdsnet.net wrote: We have about the same situation in our office. We were able to issue a CTRL-N on the new browser, which copies the security info and opens another browser. When the new browser came up, we had the title bar and could use the IE developer toolbar on it. Maybe you have the same kind of window. Alan On Fri, Oct 16, 2009 at 9:57 PM, Bret Pettichord b...@pettichord.comwrote: These are good suggestions. Years ago i had this same problem, and i was able to find a OLE method on the browser object that let me turn on the toolbars. Knowing, this i was able to use irb to turn it on. Bret Jason Trebilcock wrote: It seems like a simple solution would be to press Ctrl-N from within the ‘small browser’ to open a full browser. (Idea from: http://social.msdn.microsoft.com/forums/en-US/iewebdevelopment/thread/fdc9c290-7fce-413c-bdec-d1985b6b4290/ comment by Rob Adams on 1/17/2008 – gotta give credit where credit is due.) (I had two other options – copying and pasting the URL into a new window…or using Firefox/Firebug…but the above seems to be the easiest.) *From:* watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] *On Behalf Of *H Kogi *Sent:* Friday, October 16, 2009 2:44 PM *To:* watir-general@googlegroups.com *Subject:* [wtr-general] Identifying objects when browser window has no toolbar I am hoping someone can point me to the right direction since I was not able to find answers anywhere. My application opens a small browser (almost like a popup) that has no toolbar (screenshot attached). With no toolbar, I cannot use IE develper toolbar (if I can, please let me know.). And the page is javascript. All I can find is via irb using ie.show_all_objects that I provided below. This does not provide me enough information such as items in the pulldown list, etc. I have other similar window that has more objects. How can I identify objects? ---Objects in page - text/css id= text/javascript id= src=/sales/javascript/ext/adapter/jquery.js text/javascript id= src=/sales/javascript/ext/adapter/ext-jquery-adapter .js text/javascript id= src=/sales/javascript/ext/ext-base.js text/javascript id= src=/sales/javascript/ext/ext-all-debug.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/nam espace.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/app /App.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/app /Framework.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAApplication.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAAddProductContainer.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/uti l/DSAProductReader.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/mod el/DSAProductHelper.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/mod el/DSAProductList.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAProductConfigContainer.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAProductConfigPanel.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSADomainConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSASEOConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSASEONATConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSATOP10Config.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAPopPPCConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAPPCAdAgentConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSADIFMCustomConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSADIFMPremiumConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAOLMBundleConfig.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAProductListForm.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/uti l/DSAUIUtil.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ser vice/DSAServiceChannel.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAShoppingCartPanel.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAOrderPaymentContainer.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAOrderReviewPanel.js text/javascript id= src=/sales/javascript/app/com/xxx/storefront/dsa/ui/ DSAPaymentInfoPanel.js text
[wtr-general] Re: Html Elements Supported by Watir
Yes, Zeljko is really a nice, warm-heart person. Thanks. Wesley Chen. For life, the easier, the better. On Fri, Oct 9, 2009 at 1:34 PM, Raveendran P jazzezr...@gmail.com wrote: ZelijGO, Congrats. Awesome effort. Thanks. On Fri, Oct 9, 2009 at 11:00 AM, Pallavi Sharma write2pall...@gmail.comwrote: Zeljko its just awesome the amount of hard work you put into this group. Thanks Zeljko for every help and suggestion ... Regards, Pallavi. On Thu, Oct 8, 2009 at 10:33 PM, Charley Baker charley.ba...@gmail.comwrote: +1, Zeljko has been a long standing active member of the Watir community, taking care of the wiki, making podcasts and answering countless emails. Big thanks to him for all that he's done. :) -c On Thu, Oct 8, 2009 at 10:10 AM, tcfodor tcfo...@comcast.net wrote: Thanks so much for all you do Zeljko! I look forward to each Watir podcast and it's reassuring to know that the information on the wiki is being maintained so well! Three cheers for Z*! -Tiffany On Oct 7, 11:18 pm, Bret Pettichord bpettich...@gmail.com wrote: On Oct 7, 5:57 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Oct 6, 2009 at 4:41 AM, Bret Pettichord bpettich...@gmail.com wrote: I suggest that the two pages be folded together. Will do. I think my replies were out of order with your emails. At this point I think that all the important information on the one page is already duplicated on the other. Namely the page with the Class, element, method list. If we don't need to document the class names, then you can just drop the second page. I'm also wondering if we need to do more work to organize and update the pages that we already have. I update what I see is out of date. Again, my original comment was made before I realized how much work you've been doing recently to reorganize these pages. I had not been reading this list for some time, and responded in the order that I read through it. Also I'm not sure about all the comments that people add to the pages. Is anybody watching them? When I update the page, I take a look at the comments. Sometimes comment is about something that should be fixed. But usually the comments just sit there. Sometimes I do not even understand them, or they seem not related to the page. I think we should treat comments just like the other information on the page. If they seem irrelevant or confusing, they should be deleted. If they make suggestions which have been addressed, they should be deleted. I do this sometimes myself. BTW, I have a comment for others. I really think that Zeljko should be thanked for all the work he does to keep the wiki up to date. Could you please join me in thanking him? Bret -- Regards, P.Raveendran http://raveendran.wordpress.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: xpath
Hi, Zeljko, So, would you please show the click method here? How to flash or click after element_by_xpath method? Thanks. Wesley Chen. The easier, the better. On Fri, Sep 25, 2009 at 10:34 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Sep 25, 2009 at 2:26 PM, Angrez Singh ang...@gmail.com wrote: http://msdn.microsoft.com/en-us/library/dd347058%28VS.85%29.aspx Thanks Angrez, I have found click method. Željko --~--~-~--~~~---~--~~ 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: Setting innerHTML of a div using Watir.
It must be in a frame. You may use: ie.frame(...).document.body.focus ie.send(hello) Thanks. Wesley Chen. The easier, the better. On Fri, Sep 18, 2009 at 1:39 PM, karim rayani karim@gmail.com wrote: Why not use Javascript commands, there is a technique to insert/execute javascript commands as well, that would be a better direct way http://karimnumerouno.wordpress.com On Fri, Sep 18, 2009 at 10:45 AM, Prajakta Jadhav jadhav.praja...@gmail.com wrote: Can you post the html code of this page? Are there any frames outside the div? On Fri, Sep 18, 2009 at 5:34 AM, Brian Rosenthal brosent...@facebook.com wrote: Hi, We’re using an “editable div”, and we need to be able to set its contents using Watir (in IE). What’s the best way to do that? It doesn’t seem to respond to IE.text_field(...)... And IE.div(...).innerHTML does not work (nor set). (this syntax) div contenteditable=true/div Thanks, Brian -- Regards, Alkarim Rayani --~--~-~--~~~---~--~~ 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: How to handle Exceptions in Watir
require 'watir' require 'watir/testcase' class Test1 Watir::TestCase def test1 end def test2 end end When there is exception in test1, test2 will still run. Expect it could work. Thanks. Wesley Chen. On Thu, Sep 17, 2009 at 3:02 PM, Vishal bvkon...@gmail.com wrote: While running the testcase in Watir if an Exception is encountered, I program quits at that point. How can we handle exception in Watir Thanks, Vishal --~--~-~--~~~---~--~~ 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: I'm looking for a way to count all PageTo(*) elements or to loop until the bullet_search_white_small.gif doesn't exist in the page
For the comment below: $ie.element_by_xpath(//img[contains(@src, 'report_delete.png')]).click It can locate an image element, which has src attributes, for the report_delete.png is just part of the src. I think it can help you. Thanks. Wesley Chen. On Fri, Sep 11, 2009 at 6:03 PM, Guy guy.kid...@gmail.com wrote: Hello Orde, It sure works but I should have ask my question better. The peoplesoft-b-test-b-b- analyst-b/brisbane can't be hard coded into the xpath as it changes. is there a way to use regexpr in the xpath? I think that /job/ is always returns. Cheers, Guy On Sep 11, 9:26 am, orde ohil...@gmail.com wrote: You should take a look athttp://wiki.openqa.org/display/WTR/XPath. Something like this should work: puts browser.link(:xpath,//a...@href='/job/peoplesoft-b-test-b-b- analyst-b/brisbane/15956235/']/).text Hope it helps. On Sep 10, 8:32 am, Guy guy.kid...@gmail.com wrote: Hi Orde, It is very helpful and I already put that in my script. I would appreciate help with the next (xpath) I try to get the PEOPLESOFT TEST ANALYST and the date 'Fri 04 Sep' using xpath without getting the right value. Any ideas would be welcome. div id=resultsList class=ol id=searchResultsListlispan class=jobsearchNumber1input type=checkbox name=chkJob onClick=UpdateSelectedItems(); value=15956235/input/ spandivh2a href=/job/peoplesoft-b-test-b-b-analyst-b/brisbane/ 15956235/PEOPLESOFT span class=highlightTEST ANALYST/span/a emIntegrated Business Technologies Pty Ltd/em/h2span class=jobSearchJobListedDateFri 04 Sep/ spandivpImmediate requirement for an experienced PeopleSoft test analyst across HR/Payroll/pspan class=taxonomya href=javascript:ClassTree('catindustry=1215')I.T. amp; T/a gt; a href=javascript:ClassTree ('catoccupation=1491amp;catindustry=1215')QA/Testers/a/span/ divh3Brisbane/h3h3/h3/div/lilispan Many Thanks, Guy On Sep 10, 2:21 am, orde ohil...@gmail.com wrote: This will give you the number of links: browser = [your browser of choice] puts browser.links.length --- To create the loop: while browser.image(:src, /bullet_search_white_small.gif/).exists? puts 'exists' sleep 2 browser.refresh end Hope that helps. orde On Sep 9, 7:56 am, Guy guy.kid...@gmail.com wrote: Hello All, I'm New with watir but appreciate how good it is. I'm looking for a way to count all PageTo(*) elements or to loop until the bullet_search_white_small.gif ('Next' image) doesn't exist in the page Follows is the html code from the site div class='searchPagination'dl class='jobSearchPagination' a class='nextPage btn pinkbtn_small' href=javascript: PageTo (4)strongNextimg src='/general_ID_items/images/other/ bullet_search_white_small.gif'/strong/adtPage/dt dda href=javascript: PageTo(1)1/a/dd dda href=javascript: PageTo(2)2/a/ class='currentPage'span3/span/dd dda href=javascript: PageTo(4)4/a/dd dda href=javascript: PageTo(5)5/a/dd dda href=javascript: PageTo(6)6/a/dd dda href=javascript: PageTo(7)7/a/dd dda href=javascript: PageTo(8)8/a/dd dda href=javascript: PageTo(9)9/a/dd dda href=javascript: PageTo(10)10/a/dd/dl/div /div Cheers, Guy --~--~-~--~~~---~--~~ 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] Can I get the abscissa and longitudinal coordinates of a link/button/textfield on the page?
Hi, Guys, Now, there is a link on the page, can I get the abscissa and longitudinal coordinates of it? I would like to use that coordinates to locate a flex button beside it. Any suggestion would be quite appreciated. Thanks. Wesley Chen. --~--~-~--~~~---~--~~ 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: Have no access to the frame.
I know that points. But it is a frame, not a URL. How can I set it in my browser? Thanks. Wesley Chen. On Wed, Sep 2, 2009 at 4:41 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Sep 2, 2009 at 10:37 AM, Wesley Chen cjq@gmail.com wrote: When I try the script below in IE, it displays I have no access to the frame. Did you try things from this page (section Why do I get an access denied error when trying to access a frame?)? http://wiki.openqa.org/display/WTR/Frames Željko -- http://watirpodcast.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: Is there a method to handling modal dialog but not providing the title?
Hi, Tony, Thank you so much, I tried your code, it works perfect! It is amazing! Thanks. Wesley Chen. On Wed, Aug 26, 2009 at 4:49 PM, Tony ynot...@gmail.com wrote: Hi Wesley, iewin.clickprompt() will click the button in the popup and return the popup text. This is the definition - def clickprompt(but=OK,txt =, waitTime = 10) iewin.clickprompt(CANCEL) # will click cancel button.. actually if you pass in anything other than OK, cancel will be clicked. iewin.clickprompt(OK) or iewin.clickprompt() will click the ok button. iewin.clickprompt(OK, input text) #can be used to pass in values into the prompt box. iewin.clickprompt(OK, , 20) #can increase the wait time for the popup to occur. time = 20*0.2 will return '' if there is no popup. Code is present here - http://pastie.org/595060 Pasting it here also - def clickprompt(but=OK,txt =, waitTime = 10) tim = 0 poptxt= '' while tim waitTime sleep 0.2 pophwnd = Win32API.new(user32, GetWindow, 'Li', 'L').Call (@ie.hwnd.to_i, 6) # the above returns any popup windows that are present for the specific window tim += 0.2 tim += waitTime if pophwnd != 0 end return '' if pophwnd == 0 button = but.upcase outval = ' ' * 30 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (pophwnd,outval,30) popwndtitle = outval.rstrip.chomp(\000) # window title stored here outval = nil #poptype = 0 #alert and confirm have ie6 - Microsoft Internet Explorer #ie7 - Windows Internet Explorer #ie8 - Message from webpage if popwndtitle.include?(Microsoft Internet Explorer) || popwndtitle.include?(Windows Internet Explorer) || popwndtitle.include?(Message from webpage) #confirm and alerts have the above 3 window titles # poptype =1 means this is a javascript alert tag #poptype = 1 poptxt = handlepopup1(pophwnd,button) elsif popwndtitle.include?(Explorer User Prompt) #prompts have the above window title #poptype = 2 poptxt = handlepopup2(pophwnd,button, txt) elsif popwndtitle.include?(Connect to) #authentication dialog #also make sure the username and password text fields are present - if present we got the auth dialog cntrlhwnd = 0 cntrlhwnd = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 1002) #poptype = 3 if cntrlhwnd != 0 #verified the 2 textboxes are present to enter the values return '' if cntrlhwnd == 0 poptxt = handlepopup3(pophwnd,button, prompt) end return poptxt end def handlepopup1(pophwnd, button) # handles the alerts and confirm dialogs #Yes there is a popupwindow... hence get the controlhandle for the text control - 65535 cntrlhwnd = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 65535) #now get the text from the popup outval = ' ' * 900 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (cntrlhwnd,outval, 900) poptext = outval.rstrip.chomp(\000) outval = nil #confirm ok-1 and cancel-2, alert ok-2 cntrlhwndOK = 0 cntrlhwndCANCEL = 0 cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1) if cntrlhwndOK == 0 # only 1 button alert cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) clickWin32Button(cntrlhwndOK) # done clicking javascript ok button return poptext else # this is a confirm with 2 buttons cntrlhwndCANCEL = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) end button.include?(OK) ? clickWin32Button(cntrlhwndOK) : clickWin32Button(cntrlhwndCANCEL) #clickWin32Button(cntrlhwndCANCEL) return poptext end private :handlepopup1 def handlepopup2(pophwnd, button, prompt) #handles prompt boxes which takes a value as input cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1) cntrlhwndCANCEL = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) # get handle to the text control from the prompt box cntrlpromptText = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 8132) #now get the text from the popup outval = ' ' * 200 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (cntrlpromptText,outval, 200) poptext = outval.rstrip.chomp(\000) outval = nil cntrltextarea = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 8133) if prompt.size != 0 sendmessage = Win32API.new(user32, SendMessage, 'LLpp', 'L') sendmessage.Call(cntrltextarea, 0x000C, '', prompt) # calling sendmessage with WM_SETTEXT end button.include?(OK) ? clickWin32Button(cntrlhwndOK) : clickWin32Button(cntrlhwndCANCEL) return poptext end private :handlepopup2 def handlepopup3(pophwnd, button, prompt) # handles the auth
[wtr-general] Is there a method to handling modal dialog but not providing the title?
Hi, guys, I mean that sometimes, we know there is a modal dialog but we won't to know the title. For following, we must provide a title. But I don't want to provide it sometimes. = autoit=WIN32OLE.new('AutoItX3.Control') #ret=autoit.WinWait(title,,180) # wait the popups for 3 minutes. ret=autoit.WinWait(title,,60) # wait the popups for 3 minutes. ... = Any suggestion would be quite appreciated. Thanks. Wesley Chen. --~--~-~--~~~---~--~~ 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: Is there a method to handling modal dialog but not providing the title?
Hi, Namit, Your suggestion maybe good. I know some kinds of solution. But if I use autoit, there is no title, how can I make it? autoit=WIN32OLE.new('AutoItX3.Control') ret=autoit.WinWait(*title*,,60) Thanks. Wesley Chen. On Wed, Aug 26, 2009 at 3:08 PM, Namit namitjai...@gmail.com wrote: Hi, If you do not want to use title of the pop up then you can use the hwnd command to close the pop up by just passing the caption of button. Visit this URl for some sample examples. http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Thanks Namit On Aug 26, 11:42 am, Wesley Chen cjq@gmail.com wrote: Hi, guys, I mean that sometimes, we know there is a modal dialog but we won't to know the title. For following, we must provide a title. But I don't want to provide it sometimes. = autoit=WIN32OLE.new('AutoItX3.Control') #ret=autoit.WinWait(title,,180) # wait the popups for 3 minutes. ret=autoit.WinWait(title,,60) # wait the popups for 3 minutes. ... = Any suggestion would be quite appreciated. Thanks. Wesley Chen. --~--~-~--~~~---~--~~ 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: Is there a method to handling modal dialog but not providing the title?
Hi, Tony, Thank you very much for the quick reply. :), 1) I can't find the *below code*; 2)will iewin.clickprompt( ) click the button on the pop up? If it does, if on the pop up, there are two buttons such as OK/Cancel, how to identify them? Thanks. Wesley Chen. On Wed, Aug 26, 2009 at 3:43 PM, Tony ynot...@gmail.com wrote: Hi Wesley, There is a different technique to handling popups without autoit - This will act only on the current ie window which watir is using not any other browser. The below will handle alert, confirm , prompt, auth dialog box. Usage: require 'watir' iewin = Watir::IE.new iewin.goto(http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alerthttp://www.w3schools.com/js/tryit_view.asp?%0Afilename=tryjs_alert ) iewin.button(:value, Show alert box).click_no_wait txt = iewin.clickprompt() puts txt #prints the popup text You would have to add the below code to C:\ruby\lib\ruby\gems\1.8\gems \watir-1.6.2\lib\watir\ie-class.rb ( add into module Watir, class IE http://pastie.org/595060 Thanks, Tony --~--~-~--~~~---~--~~ 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: How to get all links inside an object
Why don't you try what you thought? Thanks. Wesley Chen. On Tue, Aug 18, 2009 at 11:17 AM, Marlon marlonmoja...@gmail.com wrote: Hi George, Thanks! What if its a div? Marlon --~--~-~--~~~---~--~~ 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 a sample code to import test data from Excel sheet
You can search in the google group, you can also turn to Watir community, you can get all the great documents about what you want. Please search... Thanks. Wesley Chen. On Tue, Aug 11, 2009 at 5:04 PM, Smruti Ranjan Kar smrutiranjan@gmail.com wrote: require 'win32ole' $application = WIN32OLE.new('Excel.Application') generalworksheet=$application.Workbooks.Open(Dir.getwd+\\Testdata\\testdata.xls).Worksheets(General) generalworksheet.Activate $test_site=generalworksheet.Cells(6,2).value On Tue, Aug 11, 2009 at 1:14 PM, zakir hussain zaki...@gmail.com wrote: Hi, I wud like to post in this group. Kindly add me in this chain Thanks zakir --~--~-~--~~~---~--~~ 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: Why it opens two IE windows?
Thank you, Alister. I run in XP professional version 2002 service pack 3. Thanks. Wesley Chen. On Mon, Jul 20, 2009 at 2:37 PM, Alister Scott alister.sc...@gmail.comwrote: Are you running Vista? If so, try this: http://wiki.openqa.org/display/WTR/FAQ#FAQ-WhatshouldIdoiftwobrowserwindowsappearwhenrunningatestunderWindowsVista%3F Cheers, Alister On Jul 20, 12:13 pm, Wesley Chen cjq@gmail.com wrote: Hi, guys, When I use: ie=Watir::IE.find(:title, //) or ie=Watir::IE.attach(:title,//), Sometimes, It open two IE windows. One is a blank, waiting to load; Another is good, running my Watir script. So, anyone encounters this kind of problem? Thanks. Wesley Chen. --~--~-~--~~~---~--~~ 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 work with java editor
You may try netbeans. It is really good. Thanks. Wesley Chen. On Sun, Jul 12, 2009 at 2:40 PM, khaja shaik khaja.sh...@gmail.com wrote: Hi Yes in our product, javaeditor was already implemented and i need to enter the text using editor. can is there any way to automate this process. Thanks, Khaja Shariff On 7/11/09, Chuck van der Linden sqa...@gmail.com wrote: Are you talking about something implemented via the browser? (e.g. an editor written in java) or something optimized for editing javascript and html code? On Jul 9, 6:04 am, khaja shaik khaja.sh...@gmail.com wrote: *Watir work with java editor* HI all, i have to automate : to enter the text in java editor (HTML editor) is it possible with watir Thanks, Khaja shariff --~--~-~--~~~---~--~~ 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: Wait for frame to load
It will be good if you add: sleep(3) in your script. Thanks. Wesley Chen. On Wed, Jul 8, 2009 at 4:10 AM, Brautigam Gergely skarlso...@yahoo.comwrote: Hi Ray! Try the wait_until function. It's in the Waitr::Waiter class. --- On *Tue, 7/7/09, Ray rayjh...@gmail.com* wrote: From: Ray rayjh...@gmail.com Subject: [wtr-general] Wait for frame to load To: Watir General watir-general@googlegroups.com Date: Tuesday, July 7, 2009, 6:14 PM Is there anyway to tell watir to wait for a frame to load? My situation is that i am filling out a form and when the form is submitted i need to wait for the frame on another page to load before continuing the script. Right now i am using sleeps but it would be very helpful to wait on the frame so i could make it work for any frame at any amount of load time. Thanks Ray --~--~-~--~~~---~--~~ 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: integrating with team system for testers
Hi, Chethan, I am looking for a good HTML report Ruby class all the time. Would you please share what you're using? Thanks in advance. Thanks. Wesley Chen. On Tue, Jun 30, 2009 at 1:43 PM, Chethan chethan2...@gmail.com wrote: I didn't get your problem, I assume that you want a system to run all the independent test suits a single HTML result file should get generated. I have implemented framework where I have multiple suites that will be run by bat file(I assume your working on Windows platform). In the suits independent scripts will send out HTML code to a file such away that it will make a HTML table. At last all the HTML code will be gathered will do some computation of no of Pass, Fail Errors. which will make a HTML result file. Let me know do you looking for same kind of framework. Thanks, Chethan On Jun 29, 7:58 pm, gary mrgaryengl...@googlemail.com wrote: Hi, I've got a number of watir scripts which I run as part of a normal regression suite. They're set up as an independent test suite and output results to html to allow easy interpretation of results. We've decided to invest in the Team tester version of Team System, after all, that's what our developers use, but I'm having trouble integrating my watir scripts. I was hoping to simply reference the individual scripts as generic tests but things are never that straight forward. Has anybody else integrated their watir scripts with Team system for testers, and if so how did you do it? Many thanks, G --~--~-~--~~~---~--~~ 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: Using name_of_frame = browser.frame(:name,NameOfFrame) for nested frame
Please change: view_frame=browser.home_frame.frame(:name, view) to view_frame = home_frame.frame(:name, view) Your comment equals to browser.browser.*** Of course it didn't work. Thanks. Wesley Chen. On Mon, Jun 29, 2009 at 10:34 AM, Peace peaceofmind1...@gmail.com wrote: view_frame=browser.home_frame.frame(:name, view) --~--~-~--~~~---~--~~ 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: Sending mail with a attachment
If you can search more in the group, you can get more you want. Few weeks ago, I have asked the same question. I don't know whether you can access the post or not: https://mail.google.com/mail/?zx=3a1ipdi1bgm4shva=1#sent/121b152d08b7ea8e Thanks. Wesley Chen. On Wed, Jun 24, 2009 at 1:14 PM, Chethan chethan2...@gmail.com wrote: Any one Pls help me out to send a report mail. On Jun 23, 2:46 pm, Chethan chethan2...@gmail.com wrote: Hi Every one, I am trying to send out the Test Resultattachmentusing ruby. Before posting my question I checked all the ways tried with ruby rails method Ruby mailfactory method. but I am unsuccessful. I am trying to send out themailusing google appsmailserver. So in this case its secure, the port no the domain every thing changes. As I found out in the net I made changes. started getting `check_response': 530 5.7.0 Must issue a STARTTLS Error. couldn't go further. Pls help me out on this. Can any body give me some solution forsendingout themail. Thanks in advance, Chethan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---