[wtr-general] Re: How to not overwrite current html report?
you can use embedded ruby in the cucumber.yml file to generate a (hopefully) unique file name: default: --no-source --color --format pretty --format html --out results_<%= DateTime.now.strftime('%y%m%d%H%M%S%L') %>_<%= rand(1-9) %>.html On Wednesday, October 18, 2017 at 11:27:57 AM UTC-4, 江南 wrote: > > Hi, > > I am using Watir Ruby and in my cucumber.yml file I have this line of code > to produce the report: > > default: --no-source --color --format pretty --format html --out results.html > > > > But this code overwrites the existing report. How do I generate a new report > each time? > > > Thanks > > > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[wtr-general] Watir running Chrome on Heroku
Has anyone been able to get headless Chrome working on Heroku via Watir? I've failed following the instructions here: https://github.com/heroku/heroku-buildpack-google-chrome, despite adding the buildpacks the GOOGLE_CHROME_BIN and GOOGLE_CHROME_SHIM ENV variables are nil. I would try to set the path to chromedriver directly but can't find what that path should be on Heroku or how to set it via Watir. Thanks, any guidance appreciated -- -- 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 --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[wtr-general] Re: Running watir tests simultaneously on different browsers
Your question is on managing test executions and cross browser testing. Managing test execution is better handled by Continuous Integration, which is a must for serious test automation attempts. (Check out Lisa Cripin's blog on this topic: http://lisacrispin.com/category/continuous-integration/) Back to your question, yes, it can be done. we implemented that following the guidance from the book 'Practical Web Test Automation': https://leanpub.com/practical_web_test_automation. The tests are distributed to different build agents (on different machines), each agent can be set to run with a specified browser, eg. Firefox or Chrome. A piece of advice: get distributed test execution done first, which can significantly reduce your test execution time (aiming for 10 minutes, regardless how many tests you have or how long does it take to run all on a single machine). The rest (cross browser testing, ..) can be easily achieved after that. On Tuesday, November 26, 2013 1:01:33 PM UTC+10, krishna.m...@adslot.com wrote: I have a set of tests which are run on firefox. is there any way i can run the same set of scripts on 2 browsers simultaneously or one after the other with out duplicating code. Im using rspec and watir-webdriver -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Re: Run the Same Test in Multiple Browsers - Watir Webdriver
In fact, to verify tests against multiple browsers, don't have to run one test the same time for 3 browsers (can be done, though). Besides maintainability, the other test automation challenge is long execution time (Google average build time: 4 minutes, http://blog.utest.com/testing-the-limits-with-patrick-copeland-part-i/2010/02/). We configured our CI server to distribute tests to different build agents (we use BuildWise Agent, http://testwisely.com/en/buildwise/downloads, you can customize your Selenium-Grid), which set to run different browsers (Firefox, Chrome). As the test assigned to different build agents for every build, essentially, all browsers are covered without sacrificing the performance. -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Watir Webdriver screenshot question: can it take screenshot for particular area/region?
I know it can take screenshot for whole page, but can it take screenshot for particular area/region by dom selectors etc.? Or can this be included in future version? Thanks, -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[wtr-general] Ruby Array Question
All, I have setup a Ruby class, made up of a bunch of subroutines. Below is an illustration: class BigTestClass def scenario1#testScenario end def scenario2#testScenario end end I have an array that consists of the names of all of the subroutines above: allMyTests = {scenario1, scenario2} I want to call my test subroutines from another script, by using the array of strings: b = BigTestClass.newallMyTests = {scenario1, scenario2} x = 0 b.allMyTests[x] When I try to call it like this, the 'allMyTests[x]' is being treated like a function. I tried treating it as string (b.allMyTests[x].to_s), but that didn't work either. I am looking for a way to call these subroutines by using the array elements. Any help is greatly appreciated. Thank you in advance. - Shelton -- 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] Watir Webdriver Performance Error
I apologize, I did not realize the screenshot of the error was insufficient. Below is the the text of the error: C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-performance-0.1.3.1/lib/watir-webdriver-performance.rb:15:in 'munge': undefined method 'each_key' for #Selenium::WebDriver::Element:0x292fcc8 NoMethodError from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-performance-0.1.3.1/lib/watir-webdriver-performance.rb:90:in 'performance' Here is the code: require 'watir-webdriver' require 'watir-webdriver-performance' b = Watir::Browser.new :ie b.goto 'http://watir.com' puts Load Time: #{b.performance.summary[:response_time]/1000} seconds.As I mentioned before, this error only occurs when I use IE 9 as the browser. I am using a Win Server 2008 R2 box. Thanks in advance for any assistance with this issue.- Shelton From: zeljko.fili...@wa-research.ch Date: Tue, 6 Dec 2011 10:47:19 +0100 Subject: Re: [wtr-general] Watir Webdriver Performance Error To: watir-general@googlegroups.com On Tue, Dec 6, 2011 at 7:22 AM, Jason Shelton jas.shel...@hotmail.com wrote: I am getting the attached error 1) Please copy/paste the text of the error. Let me know if you do not know how to do that. 2) Please provide the code that caused the error. Željko -- watir.com/book - author -- 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
[wtr-general] Watir Webdriver Performance Error
All, I am getting the attached error when I attempt to run a script that uses the Watir Webdriver performance gem, on IE 9. I cannot reproduce this error on Firefox or Chrome. Are there any particular settings that may need to be adjusted? I am running IE 9 on a Windows Server 2008 R2 machine. Any help is appreciated. Thanks. - Shelton -- 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 attachment: Error.gif
[wtr-general] Watir WebDriver Performance Error
Hello All, I am attempting to use the watir-webdriver-performance gem, but am getting an error when I try to execute the code below: require 'watir-webdriver' require 'watir-webdriver-performance' b.goto 'http://watir.com' load_secs = b.performance.summary[:response_time]/1000 puts Load Time: #{load_secs} seconds. When I run this, I get the attached error message (Performance Error.gif). Has anyone else encountered this issue, and if so, what was the resolution? Thank you for your assistance. -- 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 attachment: Performance Error.gif
RE: [wtr-general] Watir WebDriver Performance Error
All, I did not mention in my previous post that I am using IE 9, and I declare 'b' like this: b = Watir::Browser.new :ie Thanks again for your assistance. From: jas.shel...@hotmail.com To: watir-general@googlegroups.com Subject: [wtr-general] Watir WebDriver Performance Error Date: Sun, 11 Sep 2011 12:11:52 -0400 Hello All, I am attempting to use the watir-webdriver-performance gem, but am getting an error when I try to execute the code below: require 'watir-webdriver' require 'watir-webdriver-performance' b.goto 'http://watir.com' load_secs = b.performance.summary[:response_time]/1000 puts Load Time: #{load_secs} seconds. When I run this, I get the attached error message (Performance Error.gif). Has anyone else encountered this issue, and if so, what was the resolution? Thank you for your assistance. -- 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
[wtr-general] Watir and the Automated Build Process
Hello All, I have two related questions about Watir and the automated build process. My team uses TFS for our builds. I looking for a way to use TFS to launch my Watir test suite from the 'automation' box. This test suite is not on the same box as the build processes, so I cannot launch the test suite from the build process itself. Has anyone had experiences with this situation? My second question is if/how to run Watir headlessly. In the scenario described above, can Watir be run if no one is actually logged onto the machine, launching the test suite manually? If so, how? Thanks in advance for any assistance. - Jason -- 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] Re: How can I incorporate Watir into a web app(.Net MVC)?
The closest I have got working like this: 1. click a requirement (in StoryWise: web based requirement managemnet tool) 2. can view test scripts (Watir) associated with that requirement 3. click 'open test scripts' hyper link 4. the test script shown in TestWise IDE, where testers can edit/run test scripts. On Oct 12, 7:04 am, jimm ja...@jvavrik.com wrote: Hey all. So right now we are using Selenium IDE/Selenium 2 to test our sites, since they are easily programmable in C#. I'm finding them both to be unreliable and not as functional was Watir. So I'm trying to make a case for us to switch over, the main hurtle is that I need to make sure we can run the ruby scripts from a web based application. I know there is WatiR, but it seems extremely lackluster in comparison to Watin. So I guess the question is, is it possible to run the Watir scripts from a web application(specifically, .Net MVC)? The tester would essentially click the test they want to run, and have it run. I've tried to set up Ironruby to get Watir running on .Net through there, but that doesnt seem to work properly. Any suggestions? -- 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] Is Watir supports desktop application?
As Zelijko indicates, Web only. (Watir = Web Application Testing in Ruby) That having been said, a starting point/resource to consider obtaining is the book: Scripted GUI Testing with Ruby. http://pragprog.com/titles/idgtr/scripted-gui-testing-with-ruby On Mon, Oct 4, 2010 at 9:38 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Oct 4, 2010 at 4:35 PM, Maumita maumita.majum...@gmail.com wrote: Is this possible to test a desktop application using Watir or it only supports web based application. Web applications only. So it will be great if anyone can advice me for an automation tool (OpenSource) to test the functionality of my desktop application. Take a look: http://www.opensourcetesting.org/ Ž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] Re: Watir on Ruby 1.9.2
You say that, although I get the exact same error message somewhere in the win32-api: require watir-vapir browser = Vapir::IE.new C:/Ruby192/lib/ruby/gems/1.9.1/gems/win32-api-1.4.5-x86-mswin32-60/lib/ win32/api.so: [BUG] Segmentation fault So I'm not so sure. J On Sep 10, 1:35 am, Ethan notet...@gmail.com wrote: Vapir does work on 1.9.2. On Thu, Sep 9, 2010 at 07:26, Željko Filipin zeljko.fili...@wa-research.chwrote: On Thu, Sep 9, 2010 at 6:18 AM, Jason freezingki...@gmail.com wrote: I'm in a slight quandry where Rails3.0 requires ruby 1.9.2, but Watir only appears to run on 1.8.6 Until Watir supports Ruby 1.9, there are two solutions (neither tested): - watir-webdriver (not sure if it works on 1.9): http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/ - vapir (as far as I remember, it claims to work on 1.9): http://vapir.org/ Let us know if you try any of them. Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please readhttp://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...@goog legroups.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] Watir on Ruby 1.9.2
I'm in a slight quandry where Rails3.0 requires ruby 1.9.2, but Watir only appears to run on 1.8.6 (although I did manage to get it running previously on 1.9.1, see here: http://groups.google.com/group/watir-general/browse_thread/thread/f1eebf2c3c846e0f but Rails definitely doesn't run on 1.9.1) What's the latest in Ruby 1.9.2 support? Is it in the pipeline at all? J -- 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: Check out the Watir Stack Exchange site!
There’s a Watir forum on SQAForums. It has all of six Watir-related threads…it might be a interesting destination to switch efforts to. From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Chan Nguyen Sent: Friday, August 13, 2010 3:26 PM To: watir-general@googlegroups.com Subject: Re: [wtr-general] Re: Check out the Watir Stack Exchange site! I think Watir should have its own land ( a forum ). I tried both Selenium, Watin and WebTest, but I'm in love w/ Watir. On Fri, Aug 13, 2010 at 1:22 PM, Chuck van der Linden sqa...@gmail.com wrote: Too radical? I don't know. I agree something better is needed, google groups is not well suited to a 'support' type of work, there's no good way to track answered vs unanswered questions, nor which responses ended up being the best answer. Even the MSDN forums that MS has are far better, but I'm not sure if it would be open to us to create a forum there, nor if doing so would cause some kind of knee-jerk allergic reaction OMG it's Microsoft among Mac and Linux users. I created sample questions, and used up all my votes for all three types of question. I wonder if it was just not clear to people HOW to vote for the example questions? We had enough people over there, but nobody voted. did they not realize what it is they need to do? On Aug 13, 8:01 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: I am giving up on Watir Stack Exchange site (http://bit.ly/watirse). Nobody is voting on the questions. Maybe people are on vacation, or nobody cares. I will concentrate on thinking how to move Watir support tohttp://stackoverflow.com/ One idea I have: - create a page at watir.com http://watir.com/ with instructions how to post a question at stackoverflow.com http://stackoverflow.com/ - updatehttp://watir.com/support/page to say stackoverflow.com http://stackoverflow.com/ is the place for Watir support - send warning message at watir-general that it will be read only for a week - in that week post to watir-general only links to Watir questions at stackoverflow.com http://stackoverflow.com/ - see what happens and decide what to do next Is it too radical? :) Ž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.com mailto:watir-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 -- 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] Re: Useful: Installing Watir from RubyGems from behind a proxy
Done. Cheers, Jason On Jul 28, 9:13 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Jul 23, 2010 at 1:46 AM, Jason freezingki...@gmail.com wrote: This is really more about accessing rubygems and installing *anything* from behind a proxy, but for myself the whole purpose of installing Ruby and accessing RubyGems is for Watir, so might be useful for this list. Hi Jason, could you please update this wiki page with your information? http://wiki.openqa.org/display/WTR/Install+Watir Thanks, Ž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.com
[wtr-general] Understanding Modules and Classes a little better
Hey team, I might post a few discussions here over the coming days trying to better improve my framework, and to start I want to make sense of Modules and Classes. Previously I've just written a whole lot of methods, loaded every script and called each method as required, with little or no concept of placing these within Modules or Classes. it works fine, but surely I can do better. I just don't quite understand them and how to effectively use them well enough, so I'm wondering if anyone can point me in the direction of some good tutorials, or even better, some Watir-specific examples that use them well. Thanks, Jason -- 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: facing issue with clicking buttons
Or, someone might take the lazy way out and use the ruby-gmail gem. But that's just me. Automating email handling through some sort of client (web, Outlook, etc.) is just plain dumb. I sometimes use something similar in Perl if/when I need to generate/send email. When all you have is a hammer, everything pretty much looks like a nail. Sometimes you have to think outside the box to solve your problems. (Note: This is not directly in response to Chuck...rather, in response to the insanity that is test automation.) -Original Message- From: watir-general@googlegroups.com [mailto:watir- gene...@googlegroups.com] On Behalf Of Chuck van der Linden Sent: Tuesday, July 27, 2010 5:59 PM To: Watir General Subject: [wtr-general] Re: facing issue with clicking buttons Frankly I'd find some other thing to try and automate. GMAIL intentionally makes their UI difficult to automate. ID's are uniquely regenerated each time you instantiate the compose mail page (and different each time) Classes look fairly randomized and I'd place no bets on Gmail not updating them on some rotating basis. That div with 'send' in it, consists of about 5 nested divs, and I've no idea which of them is 'wired' to respond to the click. Even if we figured out the right class etc to make it work, who's to say it would stay working an hour or a day from now. (consider for a moment all the 'evil' that could be caused by people abusing an easily scriptable gmail interface and you'll understand why there's no incentive on google's part to make any of this easy for anyone., and in fact quite a bit of incentive to make it very difficult) If it's possible at all, it's likely going to take something like Xpath to do it, or practically reverse engineering the DOM on the fly On Jul 27, 6:43 am, praveen kumar praveen454gr...@gmail.com wrote: Hi Raveendran, Thanks for the reply... I tried with the all the possibilities you provided.None of them are working. Getting error as Unable to locate element. Please let me know if any other options. Thanks, Praveen On Tue, Jul 27, 2010 at 11:09 AM, Raveendran P jazzezr...@gmail.com wrote: Hi Praveen, Have you tried these possibilities ? *canvas_frame.div(:class, 'J-Zh-I J-J5-Ji Bq L3').flash* * canvas_frame.div(:id, ': 15m ').flash canvas_frame.div(:id, ': 15m ').flash * On Fri, Jul 23, 2010 at 1:32 PM, praveen kumar praveen454gr...@gmail.comwrote: Hi John, I have tried with div, but unable to click on button. Following is the code: require 'watir' require 'test/unit' require 'win32ole' class TC_article_example Test::Unit::TestCase def test_data $ie = Watir::IE.new $ie.goto(http://mail.google.com/mail/?ui=html;) #Define the excel file excel= WIN32OLE::new(excel.Application) wrkbook=excel.Workbooks.Open(C:\\test.xls) wrksheet = wrkbook.worksheets(1) wrksheet.select #read the data from excel file rows = 2 $username=wrksheet.cells(rows,A) ['text'] #puts $field $password=wrksheet.cells(rows,B) ['text'] $ie.text_field(:name,Email).set($username) $ie.text_field(:id,Passwd).set($password) $ie.button(:id, 'signIn' ).click #browser.show_frames # We need the iframe with ID 'canvas_frame'. Store it in a var. #$ie.goto(http://mail.google.com/mail/?ui=html;) canvas_frame = $ie.frame(:id, 'canvas_frame') # Get the current user's email address. We'll be sending email to it. my_address = $username mail_subject = 'Hello Watir world!' mail_body_text = 'Hi.' canvas_frame.span(:text, 'Compose Mail').click # Compose new mail canvas_frame.text_field(:name, 'to').set(my_address) canvas_frame.text_field(:name, 'subject').set(mail_subject) mail_body_frame = canvas_frame.frame(:index, 1) mail_body_frame.document.body.setproperty('innerText', mail_body_text) #$ie.goto(http://mail.google.com/mail/?ui=html;) * canvas_frame.div(:text, 'Send').click # Send the message I am facing problem here to click on Send button. It has no attributes like type, value* # canvas_frame.link(:text, 'Sent Mail').click # Browse to sent mail page # assert(canvas_frame.contains_text('Hello Watir world!')) # canvas_frame.link(:text, 'Inbox').click # Return to the inbox page $ie.link(:href,'https://mail.google.com/mail/?logouthl=en').clickhttp s://mail.google.com/mail/?logouthl=en%27%29.click $ie.close #rows=rows+1 end end I have also tried with the attribute id, but that is also not working. Please help me and let me know if require any details. Praveen On Thu, Jul 22, 2010 at 10:23 PM, John Fitisoff jfitis...@yahoo.comwrote: Try treating it as a div rather than a button?
[wtr-general] Re: Useful: Installing Watir from RubyGems from behind a proxy
I forgot one really important aspect to this - the %HTTP_PROXY% variable needs to be set. Make sure to set the environment variable %HTTP_PROXY% to your proxy server. This must be a hostname and port in URL form. E.g.: SET HTTP_PROXY http://proxy.corp.com:8080 Jason On Jul 23, 11:46 am, Jason freezingki...@gmail.com wrote: This is really more about accessing rubygems and installing *anything* from behind a proxy, but for myself the whole purpose of installing Ruby and accessing RubyGems is for Watir, so might be useful for this list. The problem lies with being behind a firewall and a normal command- line ruby install request not being able to access rubygems. I solved it with RubySSPI. This enables NTLM proxy authentication for Ruby on Windows. It uses the Microsoft Security Support Provider Interface (SSPI) to enable Ruby programs using Net::HTTP to authenticate via the proxy as the current Windows server. http://rubyforge.org/projects/rubysspi The gem includes a file called spa.rb. Copy this file to your site_ruby directory and then run the gem script directly: ruby -rspa 'C:\ruby191\bin\gem' install watir Easy. Done. Thought this might be useful for someone searching the list. - J -- 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] Useful: Installing Watir from RubyGems from behind a proxy
This is really more about accessing rubygems and installing *anything* from behind a proxy, but for myself the whole purpose of installing Ruby and accessing RubyGems is for Watir, so might be useful for this list. The problem lies with being behind a firewall and a normal command- line ruby install request not being able to access rubygems. I solved it with RubySSPI. This enables NTLM proxy authentication for Ruby on Windows. It uses the Microsoft Security Support Provider Interface (SSPI) to enable Ruby programs using Net::HTTP to authenticate via the proxy as the current Windows server. http://rubyforge.org/projects/rubysspi The gem includes a file called spa.rb. Copy this file to your site_ruby directory and then run the gem script directly: ruby -rspa 'C:\ruby191\bin\gem' install watir Easy. Done. Thought this might be useful for someone searching the list. - J -- 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] Dialog boxes..
Watir for non-web applications? No. Ruby for non-web applications? Possibly. Couple of resources to consider: Scripted GUI Testing with Ruby by Ian Dees Everyday Scripting with Ruby by Brian Marick It all depends on what you're trying to do. (Not sure how this relates to dialog boxes unless they're contained within a Windows app. Methinx a separate thread would've been more meaningful for this question.) From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Ramu Pillai Sent: Friday, July 02, 2010 1:12 PM To: watir-general@googlegroups.com Subject: Re: [wtr-general] Dialog boxes.. Hi, Can Watir be used for automating windows applications??? Everyone obviously knows it could be used for automating web browser related activities. Thanks, Musheka On Mon, Jun 14, 2010 at 10:56 AM, Ramu Pillai mush...@gmail.com wrote: Hi Željko, Thanks a lot for your prompt reply.  Mouth On Mon, Jun 14, 2010 at 9:22 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Jun 14, 2010 at 3:17 PM, Ramu Pillai mush...@gmail.com wrote: I need to work with dialog boxes in watir. Did you read this? http://wiki.openqa.org/display/WTR/Pop+Ups Željko -- watir.com http://watir.com/ - community manager watirpodcast.com http://watirpodcast.com/ - host testingpodcast.com http://testingpodcast.com/ - audio podcasts on software testing. all of them vidipodkast.com http://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.com mailto:watir-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 -- 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 create a file and save it.
Watir is really a tool for interacting with web applications. For what you want to do, you may want to rephrase the question as being Ruby-specific and not related to Watir. Further, you may want to invest a little time researching your problem. There are plenty of resources available to help you solve this problem. An initial hint is to google for 'ruby creating text file'. After that, once you have some code, you may want to reach out to a Ruby mailing list for further help. But, note that when you do reach out for help, there is going to be an expectation that you have specific questions that you're not able to solve rather than a blanket request for help. On Thu, Jun 3, 2010 at 7:28 AM, meaculpa harismah...@gmail.com wrote: I need to create a text file and save it using watir. How is it possible. Can anybody 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
[wtr-general] Ruby 1.9.1, Watir 1.6.5 and [BUG] Segmentation fault in win32-api (api.so) - SOLVED
(Just posting this in case someone else has a similar error and needs a little help. Hopefully a Google search will direct to this post.) I've just installed Ruby 1.9.1 (via these instructions: http://wiki.openqa.org/display/WTR/Install+Ruby) and in attempting to get Watir working received the following error: - - - - - - - - - - irb(main):002:0 $browser = Watir::IE.new C:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api-1.4.6-x86-mingw32/lib/ win32/api.so: [BUG] Segmentation fault ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32] -- control frame -- c:0039 p:-5483104 s:0124 b:0124 l:000123 d:000123 TOP c:0038 p: s:0122 b:0122 l:000121 d:000121 CFUNC :require c:0037 p:0011 s:0118 b:0118 l:000117 d:000117 TOPC:/Ruby19/lib/ ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:1 c:0036 p: s:0116 b:0116 l:000115 d:000115 FINISH c:0035 p: s:0114 b:0114 l:000113 d:000113 CFUNC :require c:0034 p:0011 s:0110 b:0110 l:000109 d:000109 TOPC:/Ruby19/lib/ ruby/gems/1.9.1/gems/windows-pr-1.0.9/lib/windows/error.rb:12 c:0033 p: s:0108 b:0108 l:000107 d:000107 FINISH c:0032 p: s:0106 b:0106 l:000105 d:000105 CFUNC :require c:0031 p:0011 s:0102 b:0102 l:000101 d:000101 TOPC:/Ruby19/lib/ ruby/gems/1.9.1/gems/win32-process-0.6.2/lib/win32/process.rb:1 c:0030 p: s:0100 b:0100 l:99 d:99 FINISH c:0029 p: s:0098 b:0098 l:97 d:97 CFUNC :require c:0028 p:0011 s:0094 b:0094 l:93 d:93 TOPC:/Ruby19/lib/ ruby/gems/1.9.1/gems/watir-1.6.5/lib/watir/ie-process.rb:1 c:0027 p: s:0092 b:0092 l:91 d:91 FINISH c:0026 p: s:0090 b:0090 l:89 d:89 CFUNC :require c:0025 p:0083 s:0086 b:0086 l:85 d:85 TOPC:/Ruby19/lib/ ruby/gems/1.9.1/gems/watir-1.6.5/lib/watir/ie.rb:45 c:0024 p: s:0084 b:0084 l:83 d:83 FINISH c:0023 p:0009 s:0082 b:0082 l:00157c d:81 EVAL (irb):2 c:0022 p: s:0080 b:0080 l:79 d:79 FINISH c:0021 p: s:0078 b:0078 l:77 d:77 CFUNC :eval c:0020 p:0027 s:0071 b:0071 l:70 d:70 METHOD C:/Ruby19/lib/ ruby/1.9.1/irb/workspace.rb:80 c:0019 p:0031 s:0064 b:0063 l:62 d:62 METHOD C:/Ruby19/lib/ ruby/1.9.1/irb/context.rb:218 c:0018 p:0030 s:0058 b:0058 l:000e3c d:57 BLOCK C:/Ruby19/lib/ ruby/1.9.1/irb.rb:157 c:0017 p:0039 s:0050 b:0050 l:49 d:49 METHOD C:/Ruby19/lib/ ruby/1.9.1/irb.rb:271 c:0016 p:0011 s:0045 b:0045 l:000e3c d:44 BLOCK C:/Ruby19/lib/ ruby/1.9.1/irb.rb:154 c:0015 p:0132 s:0041 b:0041 l:24 d:40 BLOCK C:/Ruby19/lib/ ruby/1.9.1/irb/ruby-lex.rb:244 c:0014 p: s:0038 b:0038 l:37 d:37 FINISH c:0013 p: s:0036 b:0036 l:35 d:35 CFUNC :loop c:0012 p:0009 s:0033 b:0033 l:24 d:32 BLOCK C:/Ruby19/lib/ ruby/1.9.1/irb/ruby-lex.rb:230 c:0011 p: s:0031 b:0031 l:30 d:30 FINISH c:0010 p: s:0029 b:0029 l:28 d:28 CFUNC :catch c:0009 p:0023 s:0025 b:0025 l:24 d:24 METHOD C:/Ruby19/lib/ ruby/1.9.1/irb/ruby-lex.rb:229 c:0008 p:0042 s:0022 b:0022 l:000e3c d:000e3c METHOD C:/Ruby19/lib/ ruby/1.9.1/irb.rb:153 c:0007 p:0011 s:0019 b:0019 l:000dc4 d:18 BLOCK C:/Ruby19/lib/ ruby/1.9.1/irb.rb:70 c:0006 p: s:0017 b:0017 l:16 d:16 FINISH c:0005 p: s:0015 b:0015 l:14 d:14 CFUNC :catch c:0004 p:0174 s:0011 b:0011 l:000dc4 d:000dc4 METHOD C:/Ruby19/lib/ ruby/1.9.1/irb.rb:69 c:0003 p:0039 s:0006 b:0006 l:001efc d:0023c4 EVAL C:/Ruby19/bin/irb: 12 c:0002 p: s:0004 b:0004 l:03 d:03 FINISH c:0001 p: s:0002 b:0002 l:001efc d:001efc TOP --- -- Ruby level backtrace information- C:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/ api.rb:1:in `require' C:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/ api.rb:1:in `top (required)' C:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-pr-1.0.9/lib/windows/ error.rb:12:in `require' C:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-pr-1.0.9/lib/windows/ error.rb:12:in `top (required)' C:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-process-0.6.2/lib/win32/ process.rb:1:in `require' C:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-process-0.6.2/lib/win32/ process.rb:1:in `top (required)' C:/Ruby19/lib/ruby/gems/1.9.1/gems/watir-1.6.5/lib/watir/ie-process.rb: 1:in `require' C:/Ruby19/lib/ruby/gems/1.9.1/gems/watir-1.6.5/lib/watir/ie-process.rb: 1:in `top (required)' C:/Ruby19/lib/ruby/gems/1.9.1/gems/watir-1.6.5/lib/watir/ie.rb:45:in `require' C:/Ruby19/lib/ruby/gems/1.9.1/gems/watir-1.6.5/lib/watir/ie.rb:45:in `top (required)' (irb):2:in `irb_binding' C:/Ruby19/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval' C:/Ruby19/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate' C:/Ruby19/lib/ruby/1.9.1/irb/context.rb:218:in `evaluate' C:/Ruby19/lib/ruby/1.9.1/irb.rb:157:in `block (2 levels) in eval_input' C:/Ruby19/lib/ruby/1.9.1/irb.rb:271:in `signal_status' C:/Ruby19/lib/ruby/1.9.1/irb.rb:154:in `block in eval_input'
RE: [wtr-general] method_missing due to bad html?
Tom, If you try to execute each line of your script through irb, what kind of results are you seeing? I was able to execute your script without issue on my machine here (Windows 7, Ruby 1.8.6, Watir 1.6.5). Part of me is wondering if what you're running into is some sort of permissions issue. Here's a copy of my irb session (note: I was also able to run things in a script without issue): Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\jasonirb irb(main):001:0 require watir = true irb(main):002:0 browser = Watir::Browser.new = #Watir::IE:0x3ae81a4 url=about:blank title= irb(main):003:0 browser.goto(http://202.36.68.44/;) = 1.683 irb(main):004:0 puts browser.url http://202.36.68.44/ = nil irb(main):005:0 -Original Message- From: watir-general@googlegroups.com [mailto:watir- gene...@googlegroups.com] On Behalf Of Tom Sent: Thursday, December 10, 2009 7:19 PM To: Watir General Subject: [wtr-general] method_missing due to bad html? Sorry if this is a repeat, but I did search for this issue and didn't find it. I'm a novice at both Ruby and Watir, as well. I have a very simple script (part of a much larger script that I'm trying to resurrect): require watir browser = Watir::Browser.new browser.goto(http://202.36.68.44/;) puts browser.url that results in c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb: 465:in `method_missing': unknown property or method `LocationURL' (WIN32OLERuntimeError) HRESULT error code:0x800706b5 The interface is unknown. from c:/ruby/lib/ruby/gems/1.8/gems/ watir-1.6.5/lib/watir/ie-class.rb:465:in `url' from mytest.rb:6 Originally I thought there was a compatability issue with IE8. But after removing/reinstalling both Ruby and Watir, I still get this error. I suspect the html is at issue, as this script obviously will work with other sites (tested by going to google). But the HTML validates (so I'm told by the developer). Can anybody provide at least a direction if not an answer? Cheers, Tom -- 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] Re: Really....Ruby + Watir + Command Line
In a previous email, you indicate that you're running Watir 1.4.1. But, the below indicates that you're on 1.6.2. In any case, I tried running your code and it worked fine. (What happens if you switch the require 'watir' and require 'rubygems' lines? Could that be the source of your problem? Further, do you have the variable RUBYOPT set in your environment variables with the value of 'rubygems'?) That is: require 'watir' require 'rubygems' #require win32ole ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).click On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote: Here is the list of my local gems (just incase its helps) *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) builder (2.1.2) camping (1.5.180) commonwatir (1.6.2) cucumber (0.4.3) diff-lcs (1.1.2) firewatir (1.6.2) fxri (0.3.7, 0.3.6) fxruby (1.6.19, 1.6.12) hoe (2.3.3) hoe-seattlerb (1.2.1) hpricot (0.8.2, 0.6) json_pure (1.1.9) log4r (1.1.2, 1.0.5) markaby (0.5) metaid (1.0) minitest (1.4.2) polyglot (0.2.9) rack (1.0.1) rails (2.3.4) rake (0.8.7, 0.7.3) rspec (1.2.9) rubyforge (2.0.3) rubygems-update (1.3.5) s4t-utils (1.0.4) session (2.4.0) sources (0.0.1) term-ansicolor (1.0.4) test-spec (0.10.0) treetop (1.4.2) user-choices (1.1.6) watir (1.6.2) win32-api (1.4.5, 1.0.4) win32-clipboard (0.5.2, 0.4.3) win32-dir (0.3.5, 0.3.2) win32-eventlog (0.5.2, 0.4.6) win32-file (0.6.3, 0.5.4) win32-file-stat (1.3.4, 1.2.7) win32-process (0.6.1, 0.5.3) win32-sapi (0.1.5, 0.1.4) win32-sound (0.4.2, 0.4.1) win32console (1.2.0) win32ole-pp (1.2.0) windows-api (0.4.0, 0.2.0) windows-pr (1.0.8, 0.7.2) xml-simple (1.0.12) Is there any gem that I am missing that is causing the error? On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote: I removed include Watir now my script is: require 'watir' require 'rubygems' #require win32ole ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).click I still get the same error message. I am using watir 1.4.1. Below is my ruby version C:\rubyruby --version ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] I have done gem update prevsiously, gem system updates but nothing works. Any ideas on what I can do to get a basic script up and running using watir? On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Add first line -- require 'rubygems' Remove line no.2 -- include Watir I hope it works now. If its not working then Please provide more details about Watir Verison and Ruby version. Thanks On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote: I am trying to run a watir script: require 'watir' include Watir ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).submit when I run it from command line ruby filename.rb I get the following error message: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing': unknown proper ty or method `document' (WIN32OLERuntimeError) HRESULT error code:0x800706ba The RPC server is unavailable.from c:/ruby/lib/ruby/ site_ruby/1.8/watir.rb:1336:in `document' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in `getContainerContents' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in `getObject' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `text_field' from script1.rb:6 Any Ideas.? -- Regards, P.Raveendranhttp://raveendran.wordpress.com-Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Really....Ruby + Watir + Command Line
Not exactly what I had in mind when I mentioned checking the environment variables. For Windows: Control Panel = System = Advanced = Environment Variables. On Tue, Nov 10, 2009 at 11:06 AM, orde ohil...@gmail.com wrote: 1. How do I check my envirnoment variables for ruby? This will give you the list (from command line): ruby -e 'puts global_variables.sort' This will give you the value for an individual env var: ruby -e 'puts [env_var]'. For example: ruby - e 'puts $DEBUG' orde On Nov 10, 8:47 am, tester86 sagar.am...@gmail.com wrote: I do not think that it is a permission an issue and I am using windows vista but going to be working on windows 7 soon. I do not know how to get a stack trace from my output. In my previous posts shows the error message that I get in command prompt. Question: 1. How do I check my envirnoment variables for ruby? On Nov 10, 9:38 am, Bret Pettichord b...@pettichord.com wrote: I am wondering if maybe this is a permissions problem. Are you using Windows 7? It would help if you printed the error and stack trace that you are now getting. Bret tester86 wrote: This morning I just upgraded to watir 1.6.2 and I also switched the lines but I still got the same output. On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com wrote: In a previous email, you indicate that you're running Watir 1.4.1. But, the below indicates that you're on 1.6.2. In any case, I tried running your code and it worked fine. (What happens if you switch the require 'watir' and require 'rubygems' lines? Could that be the source of your problem? Further, do you have the variable RUBYOPT set in your environment variables with the value of 'rubygems'?) That is: require 'watir' require 'rubygems' #require win32ole ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).click On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote: Here is the list of my local gems (just incase its helps) *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) builder (2.1.2) camping (1.5.180) commonwatir (1.6.2) cucumber (0.4.3) diff-lcs (1.1.2) firewatir (1.6.2) fxri (0.3.7, 0.3.6) fxruby (1.6.19, 1.6.12) hoe (2.3.3) hoe-seattlerb (1.2.1) hpricot (0.8.2, 0.6) json_pure (1.1.9) log4r (1.1.2, 1.0.5) markaby (0.5) metaid (1.0) minitest (1.4.2) polyglot (0.2.9) rack (1.0.1) rails (2.3.4) rake (0.8.7, 0.7.3) rspec (1.2.9) rubyforge (2.0.3) rubygems-update (1.3.5) s4t-utils (1.0.4) session (2.4.0) sources (0.0.1) term-ansicolor (1.0.4) test-spec (0.10.0) treetop (1.4.2) user-choices (1.1.6) watir (1.6.2) win32-api (1.4.5, 1.0.4) win32-clipboard (0.5.2, 0.4.3) win32-dir (0.3.5, 0.3.2) win32-eventlog (0.5.2, 0.4.6) win32-file (0.6.3, 0.5.4) win32-file-stat (1.3.4, 1.2.7) win32-process (0.6.1, 0.5.3) win32-sapi (0.1.5, 0.1.4) win32-sound (0.4.2, 0.4.1) win32console (1.2.0) win32ole-pp (1.2.0) windows-api (0.4.0, 0.2.0) windows-pr (1.0.8, 0.7.2) xml-simple (1.0.12) Is there any gem that I am missing that is causing the error? On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote: I removed include Watir now my script is: require 'watir' require 'rubygems' #require win32ole ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).click I still get the same error message. I am using watir 1.4.1. Below is my ruby version C:\rubyruby --version ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] I have done gem update prevsiously, gem system updates but nothing works. Any ideas on what I can do to get a basic script up and running using watir? On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote: Hi, Add first line -- require 'rubygems' Remove line no.2 -- include Watir I hope it works now. If its not working then Please provide more details about Watir Verison and Ruby version. Thanks On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote: I am trying to run a watir script: require 'watir' include Watir ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).submit when I run it from command line ruby filename.rb I get the following error message: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing': unknown proper ty or method `document' (WIN32OLERuntimeError) HRESULT error code:0x800706ba
[wtr-general] Re: Really....Ruby + Watir + Command Line
Per http://wiki.openqa.org/display/WTR/include+Watir Don't use 'include' On Mon, Nov 9, 2009 at 3:49 PM, tester86 sagar.am...@gmail.com wrote: I am trying to run a watir script: require 'watir' include Watir ie = Watir::IE.new ie.goto(http://google.com;) ie.text_field(:name, q).set(watir) ie.button(:name, btnG).submit when I run it from command line ruby filename.rb I get the following error message: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing': unknown proper ty or method `document' (WIN32OLERuntimeError) HRESULT error code:0x800706ba The RPC server is unavailable.from c:/ruby/lib/ruby/ site_ruby/1.8/watir.rb:1336:in `document' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in `getContainerContents' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in `getObject' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `text_field' from script1.rb:6 Any Ideas.? --~--~-~--~~~---~--~~ 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: uninitialized constant Watir::PageContainer::Win32
See Bret's comment here (Nov 13, 2008, 12:17 am): http://groups.google.com/group/watir-general/browse_thread/thread/f3d3d8f602 3890cb/016c62b5a5ff6fb6 Tested it locally and it worked for me. -Original Message- From: watir-general@googlegroups.com [mailto:watir- gene...@googlegroups.com] On Behalf Of Shlomit Gazit Sent: Friday, October 30, 2009 6:56 PM To: Watir General Subject: [wtr-general] uninitialized constant Watir::PageContainer::Win32 I am trying to use enabled_popup.rb. I added require 'watir/contrib/ enabled_popup', but when I am starting the server I am getting: C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/ enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32 (NameError) from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Program Files/Genuitec/MyEclipse 7.5/Workspaces/MyEclipse/ c2p_watir/c2p_test_issues_2_menus_dev.rb:18 All the solutions showed to add include Win32 in the rb file, but as I looked it is already there. Any ideas? --~--~-~--~~~---~--~~ 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: Answering incomplete requests
Seems to me, if we're receiving 'incomplete requests', then maybe there's a way to drive towards more complete requests. In the LoadRunner forum on SQAForums, they're pretty militant about getting environment information upfront before they'll answer questions. Maybe if we adopted some sort of a set of questions to be answered, then we might get some more thorough questions and be better able to provide answers. Something akin to: Ruby version: Watir version: OS/browser versions: Code: HTML: What's wrong/not working/whatever (how 'bout an error message?): Granted, there are some questions (and/or people) for whom this might be a little ridiculous...but it could make for an easy template to spit back at the incomplete request. Like you said, it really isn't terribly different from someone logging a defect/enhancement/whatever. So a little pushback, I think, might get things moving in a better direction. On Fri, Oct 23, 2009 at 2:49 PM, Bret Pettichord b...@pettichord.comwrote: This is a note to those of you who are answering other people's questions here. The rest of you can stop reading. Really. If you stay I'll just hurt your feelings. Ok. We need to have a frank discussion. We're getting a lot of crappy questions. There are a lot of requests for help coming in where the requester is posting way too little information for any one to possibly help them. And what's worse, you ask for more info and they reply with a lot of blather, but don't actually give you the information that we need to answer their questions. I've been getting sucked into this myself lately. I feel bad for them. I want to help. When you say it doesn't work, are you getting an error message? How many times do we need to ask this here? And then they reply, telling us they tried something else, but it didn't work either, and they still don't give us an error message! Or they give us just part of the error message. Or they leave out the stack trace. I guess they assume that because the stack trace looks like a bunch of gibberish, it won't help us either. You'd almost think that maybe they don't know anything about testing software or how to write a bug report. I learned how to extract a stack trace from a core file 20 years ago so that I could include it in my bug reports. With Ruby it just gets printed out. It's just a matter of cut and paste. Can we see your script?. Have you read the FAQ? What have you tried? -- How many times do we have to ask these questions? What can we do about it? 1. Stop responding to incomplete requests. Maybe they will repost with more information. Maybe not. Anyway, just ignore them. 2. Humiliate them and question their right to claim to be a tester if they can't even report a problem correctly. Make it clear that Watir is only for testers who have some basic competence. 3. What else? Bret -- Bret Pettichord Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord --~--~-~--~~~---~--~~ 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: cannot register window class in IE8
Couple of thoughts in the following: http://www.microsoft.com.nsatc.net/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.internetexplorer.betatid=77003381-d793-4236-a6a6-5466c779b85dcat=lang=cr=sloc=p=1 In a nutshell, three potential options: 1. Ctrl-F5 2. Delete temporary internet files 3. Disable Fireshot plugin in FF and try again On Thu, Oct 22, 2009 at 11:38 AM, aidy lewis aidy.le...@googlemail.comwrote: Hi Bret, I am getting an unspecified WIN32OLERuntimeError. Not much information, I know. Aidy 2009/10/22 Bret Pettichord b...@pettichord.com: I haven't heard of this. Can your provide a stack trace and complete error message? Bret aidy lewis wrote: Hi, Has anyone received 'cannot register window class' errors when running Watir tests in IE8? Aidy -- Bret Pettichord Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord --~--~-~--~~~---~--~~ 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: Elements supported by Watir
Hey Brett, How is it that you got Watir::Dd, Watir::Dt Watir::Dl (amongst others like Watir::Strong) in your list? When I run the same code these are not returned - wondering if you have custom methods in place for those, or what I need to do to make sure they are identifiable elements? - Jason On Sep 29, 5:08 am, Bret Pettichord bpettich...@gmail.com wrote: On Sep 28, 4:54 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: Do we have a place where all elements (link, image, button...) supported by Watir are listed? Is this list complete? http://wiki.openqa.org/display/WTR/Methods+Supported+by+Element I've been trying to keep it up to date Is there a simple way I could take a look in the code and find which elements Watir supports? I see we have Element class and I suppose all elements inherit it. I have searched Watir code for ` Element` and found a lot of places where it appears. Is there a central location where all elements are collected? def is_element_subclass?klass whileklass=klass.superclass return true ifklass== Watir::Element end end ObjectSpace.each_object(Class){|c| puts c if is_element_subclass?(c)} Watir::HTMLElement Watir::Link Watir::Image Watir::TableCell Watir::TableRow Watir::TableBody Watir::TableBodies Watir::Table Watir::CheckBox Watir::Radio Watir::RadioCheckCommon Watir::FileField Watir::Hidden Watir::TextField Watir::Button Watir::SelectList Watir::InputElement Watir::Em Watir::Strong Watir::Dd Watir::Dt Watir::Dl Watir::H6 Watir::H5 Watir::H4 Watir::H3 Watir::H2 Watir::H1 Watir::Ul Watir::Li Watir::Label Watir::Area Watir::Map Watir::Span Watir::Div Watir::P Watir::Pre Watir::NonControlElement Watir::Form Ž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: Does Watir support PHP based technology
In addition to Željko's answer... Are there other modules required to be installed along with Watir? Short answer: No. Longer answer: It depends on what you want to do. If the sole focus of your testing is the web front-end, then you are probably safe not having to install any other gems. But, if you want to do things like connect to a database or connect to a remote machine, then there are gems that you might want to consider installing to better support those tasks. On Wed, Sep 2, 2009 at 7:41 AM, rrash586 rrash...@gmail.com wrote: Hi All, I am new to watir and want to evaluate one web apps which is PHP based.Does watir support PHP based technology .Please let me know I does there any other modules require to install alongwith watir. I m using watir Watir 1.5.1. Does there any link for knowing the thingfs more 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: ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: could not find gem watir locally or in a repository
Run the following at the command line:gem sources This will list out the sources configured on your system. And, if that fails, then try the following: gem env This lists out your current RubyGems environment. And if all of those fail, then I'd be willing to hazard a guess that you may want to set up the RUBYOPT environment variable. These three items should give you a number of initial steps to start further debugging what is taking place. On Fri, Aug 14, 2009 at 12:49 PM, anna barbara ostrowska ab.ostrow...@gmail.com wrote: It did not help. Any other ideas? I have not such a problem in the past. Thanks in advance. Anna 2009/8/10 Charley Baker charley.ba...@gmail.com The most likely situation is that you're behind a proxy server: http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIgeminstallWatirbehindaproxyserver%3F Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Mon, Aug 10, 2009 at 11:24 AM, anna barbara ostrowska ab.ostrow...@gmail.com wrote: Hi guys, I was trying to install watir on windows. However after typeing 'gem install watir' I have experienced following error: ERROR: http://gems.rubyforge.org/ does not appear to be a repository ERROR: could not find gem watir locally or in a repository Any ideas how to deal with it? Thanks in advance. Anna --~--~-~--~~~---~--~~ 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] is it possible the send firefox a new dom?
does anyone know if it is possible to save the fire fox dom and load it back up again, for examples (pseudo code here) @ff.goto(some_address_some_path) full_dom_dump = @ff.full_dom_dump write_to_file(a_file_on_my_hard_disk, full_dom_dump) @ff.go_do_alot_of_other_stuff then some time later @ff.goto(some_address_some_path) full_dom_dump = read_a_file(a_file_on_my_hard_disk) @ff.full_dom_dump = full_dom_dump any ideas would be very much appeciated thanks a million jason. --~--~-~--~~~---~--~~ 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: Received data in read_socket is empty
as you have worked out already - it looks like a timing problem - this normally happens when the page has not finished loading. this is because the wait method looks for isLoadingDocument when it should be looking for webProgress.busyFlags hope that helps. jason. On 19 Jun., 12:43, dottree yuanchun.l...@gmail.com wrote: Now I'd like to click an image in a page by it's id, but sometimes it returns empty value to me when the image is actually existing (error raised in MozillaBaseElement.rb:1117:in `click'). My script is something like: someframe.image(:id, someimg).click() But when I go through the scripts in debug mode, the image can be found. So I suspected whether it's caused by socket and tried to add sleep in the location as following, the data can be received correctly after that. ==container.rb def read_socket(socket = jssh_socket) . while(s == nil) do s = Kernel.select([socket] , nil , nil, 1) end # sleep 0.2 # added sleep for stream in [socket] data = stream.recv(1024) #here data is empty when sleep not added .. Have any ideas about it? --~--~-~--~~~---~--~~ 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 force javascripts links when clicked to load in a new window
Hi all, Using firewatir, do you know if I can force javascripts links when clicked to load in a new window. ff.goto(someurl) ff.link(:index, 1).click #assuming that it has a javascript function call in the href I would love that click to open a new window and load the result of the javascript function call. (i.e. the same sort of option when you get with a right mouse click on a link and firefox asks you if you want to open the link in a new tab or a new window). any ideas?? thanks a million. Jason. --~--~-~--~~~---~--~~ 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 text in a processing your request page
how about browser.html.include(We are processing your request) On 16 Jun., 00:45, George george.sand...@gmail.com wrote: I tried search the forum but couldn't come up with a situation similar to mine. I'm filling out a form, which takes me to a 'Review your order' page. When I click the Submit button, I see a transitional We are processing your request page. From there, I'm taken to the Thank you for your order page. I've tried: = browser.button(:id, bttnSubmit).click # I also tried click_no_wait browser = Watir::IE.attach(:title, /Processing/) if browser.text.include?(We are processing your request) puts Text is there else puts Text is not there end = It seems that it won't process anything after I click Submit until I'm taken to the Thank you page. Does anyone know how I capture from the processing page? Thanks, George --~--~-~--~~~---~--~~ 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: firewatir form submit working???
Hi Angrez, No - what I am saying is that under some conditions form.submit does not work. I have found that it makes no difference if a form is within a frame or not. In general, it seems that some forms work with form.submit and some do not - I just cannot figure out why. On 17 Jun., 08:48, Angrez Singh ang...@gmail.com wrote: So jason you mean to say if you are submitting form which is inside a Frame/IFrame it doesn't work. But if that is directly on the page it works. Am I correct here? - Angrez On Wed, Jun 17, 2009 at 3:37 AM, orde ohil...@gmail.com wrote: Took a closer look. WORKS: http://www.jobware.de/ ff.form(:index, 1).text_field(:index, 1).value = ruby ff.form(:index, 1).submit DOESN'T WORK: http://www.monster.de ff.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 ff.form(:index, 1).submit BUT THIS WORKS: browser.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 browser.link(:id, 'ctl00_ctl00_searchBox_MessagizedButton1').click The above link has an href attribute of javascript:AjaxSearch_DoSearchRedirect(), so there's some redirect magic going on there. COMPARING THE FORM TAGS: http://www.jobware.de- form style=display: inline; method=get action=/st/index.html name=easyfinder http://www.monster.de- form id=aspnetForm class=mainForm action=home.aspx method=post name=aspnetForm Since action=home.aspx in form id=aspnetForm, it looks like the form data is sent to the home page, which then refreshes. Hope that helps... orde On Jun 16, 4:08 am, jason jason.franklin.sto...@gmail.com wrote: Orde, thanks for looking at this. unfortunately thats not the answer - maybe even a little off track. I am getting a lot cases where form.submit does not work as expected. another case iswww.monster.de ff.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 ff.form(:index, 1).submit The page renders no result from the form.submit (just a page refresh). I thought that this might have something to do with the fact that that the form has no submit buttons in it - so tried a from that does have input buttons defined: https://careers3.accenture.com/taleo/taleo.asp?countryname=Germany ff.frame(:index, 1).form(:index, 1).text_field(:name, jobNumberSearch).value = 12345 ff.frame(:index, 1).form(:index, 1).submit also here, the page renders no result from the form.submit (it just refreshes the page) however, this page works just fine: http://www.jobware.de/ ff.form(:index, 1).text_field(:index, 1).value = ruby ff.form(:index, 1).submit and because i thought it might have somthing to do with iframes being declaired on in the page i built a html document with the google search page in the iframe, that also worked as expected. So I really am stuck on why. I cannot figure out what the causing this behaviour - it least if I knew, could try fixing it. has anyone got any ideas? I am more looking for the cause, rather than a work around. thanks a million. Jason. On 15 Jun., 22:43, orde ohil...@gmail.com wrote: Looks like it's a cross-domain issue. This code: browser = Watir::IE.start('http://www.adecco.de/GERMAN/candidates/ jobsuche/Pages/DEJobSuche.aspx') puts browser.show_frames yields this message: frame index: 1 Access Denied, seehttp:// wiki.openqa.org/display/WTR/FAQ#access-denied So, check outhttp://wiki.openqa.org/display/WTR/FAQ#access-denied. There are a few workarounds listed there (e.g. go directly to frame URL, add URL to browser's trusted sites, tweak etc/host file). Hope that helps. orde PS: I'm using IE7 + watir 1.8.6 + ruby 1.6.2. On Jun 15, 8:08 am, jason jason.franklin.sto...@gmail.com wrote: HI I have a simple case that i cannot seem to make work. i.e. fill out a form and submit it and see a new resulting page. here the real example: ff.goto(http://www.adecco.de/GERMAN/candidates/jobsuche/Pages/ DEJobSuche.aspx) ff.frame(:index, 1).form(:index, 1).text_field(:index , 1).set (hello) ff.frame(:index, 1).form(:index, 1).submit the submit_form method in firewatir does get called and the browser does recieve the .submit command but the page just rebuilds the form - even with the word hello that i set it with. and ideas why a page is not being generated. hoping that i am missing somthing very simple. thanks for your help jason. --~--~-~--~~~---~--~~ 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
[wtr-general] Re: firewatir form submit working???
Orde, Thanks a million for spending so much time on this - totally appreciated. After consulting my javascript book - The satement forms that have onsubmit defined MAY not work when the function submit() is called. It seems that the function submit() does not trigger the onsubmit event handler. The onsubmit event handler will only be triggered by a genuine click (fire event). onsubmit is evaluated before submit - if false is returned then submit will not be excecuted. The book suggests that onsubmit function can be called seperately with element.onsubmit() So then the following should be the valid sequence. form(:index, 1).submit if form(:index, 1).onsubmit (of course an onsubmit method would need to be added to firewatir for the above line to work (or the existing js_eval method could eb used instead). HAVING SAID THAT: The form defined at www.monster.de does not have any buttons and does not have onsubmit defined in the form. so this sort of this thing: form(:index, 1).submit if form(:index, 1).onsubmit would not work. as Orde pointed out, the only thing that works for that form is fireing a click event on a specific link. browser.link(:id, 'ctl00_ctl00_searchBox_MessagizedButton1').click This link contains the on href javascript:AjaxSearch_DoSearchRedirect (). It is actually this function that ends up submitting the form. As there is no direct connection between this link and the form it is almost impossible for a mthod to identify this link as actually being the element that submits the form. This is a disaster if your software has to find forms and submit them on its own without knowing about them before hand. This problem seems to go from the hundreds to the millions very quickly - so, is there another solution. It seems that all the forms in question react to a keyboard return - i.e. they submit. The only thing is - firewatir does not have a way of fireing a keyboard event (as far as I know). If it did then i could imagine somthing like this working for every form: form(:index, 1).text_field(:index, 1).value=whatever #fill in the form with something form(:index, 1).text_field(:index, 1).click #this should activate any onfocus event handlers on the page form(:index, 1).press_enter#(as apposed to click) Does anyone know how this could be achieved from within firewatir? Thanks a million Jason. On 17 Jun., 00:07, orde ohil...@gmail.com wrote: Took a closer look. WORKS: http://www.jobware.de/ ff.form(:index, 1).text_field(:index, 1).value = ruby ff.form(:index, 1).submit DOESN'T WORK: http://www.monster.de ff.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 ff.form(:index, 1).submit BUT THIS WORKS: browser.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 browser.link(:id, 'ctl00_ctl00_searchBox_MessagizedButton1').click The above link has an href attribute of javascript:AjaxSearch_DoSearchRedirect(), so there's some redirect magic going on there. COMPARING THE FORM TAGS: http://www.jobware.de- form style=display: inline; method=get action=/st/index.html name=easyfinderhttp://www.monster.de- form id=aspnetForm class=mainForm action=home.aspx method=post name=aspnetForm Since action=home.aspx in form id=aspnetForm, it looks like the form data is sent to the home page, which then refreshes. Hope that helps... orde On Jun 16, 4:08 am, jason jason.franklin.sto...@gmail.com wrote: Orde, thanks for looking at this. unfortunately thats not the answer - maybe even a little off track. I am getting a lot cases where form.submit does not work as expected. another case iswww.monster.de ff.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 ff.form(:index, 1).submit The page renders no result from the form.submit (just a page refresh). I thought that this might have something to do with the fact that that the form has no submit buttons in it - so tried a from that does have input buttons defined: https://careers3.accenture.com/taleo/taleo.asp?countryname=Germany ff.frame(:index, 1).form(:index, 1).text_field(:name, jobNumberSearch).value = 12345 ff.frame(:index, 1).form(:index, 1).submit also here, the page renders no result from the form.submit (it just refreshes the page) however, this page works just fine: http://www.jobware.de/ ff.form(:index, 1).text_field(:index, 1).value = ruby ff.form(:index, 1).submit and because i thought it might have somthing to do with iframes being declaired on in the page i built a html document with the google search page in the iframe, that also worked as expected. So I really am stuck on why. I cannot figure out what the causing this behaviour - it least if I knew, could try fixing it. has anyone got any ideas? I am more looking for the cause, rather than a work around. thanks a million. Jason
[wtr-general] Re: firewatir form submit working???
hmmm, ok - it seems from looking at the firewatir code that I have been misunderstanding what fire_event in the firewatir code does. I thought it did exactly that - fire an event to the browser through jssh - which is in hind sight VERY stupid of me. fire_event seems to literally call the javascript method defined for the object in the browser dom that will be called when the browser recieves and event for that object. So if a method has been attached to an object (onclick, onsubmit etc) it will just be called through jssh when the firewatir method fire_event has been called with a specific evet type - and only for that specific object. This will not of course effect any other objects listening for the event - unless fire_event is called for them too (which firefox does automatically when it gets an event - i.e. keyboard, mouse etc). This means that we dont really reproduce globally accross all objects in the browser dom what could happen when an single local object is clicked or the keyboard is pressed. I am seeing a lot of pages where many objects are listing for the same event and then react accordingly - this behaviour we cannot (i dont think) reproduce with any degree of success. What does this mean for the submit() method working on some forms and not on others? Basically either - there is someway on a unix machine to simulate real mouse and keyboard events (any suggestions welcome) - or find the object in the form or on the page that actually submits the form (objects that are not within the form can easilly be programmed in javascript to submit the form - even though they have seemingly nothing to do with the form at all), click it and hope that no other objects on the page or in the form that do somthing really important before or after the form get submitted. I think however, that in most cases a click on the submit object should work - even though difficult for a software agent to locate prgramatically. if anyone has a different view on my findings, please let me know - and i hope this helps someone else with the same problem. jason. On 17 Jun., 10:54, jason jason.franklin.sto...@gmail.com wrote: Orde, Thanks a million for spending so much time on this - totally appreciated. After consulting my javascript book - The satement forms that have onsubmit defined MAY not work when the function submit() is called. It seems that the function submit() does not trigger the onsubmit event handler. The onsubmit event handler will only be triggered by a genuine click (fire event). onsubmit is evaluated before submit - if false is returned then submit will not be excecuted. The book suggests that onsubmit function can be called seperately with element.onsubmit() So then the following should be the valid sequence. form(:index, 1).submit if form(:index, 1).onsubmit (of course an onsubmit method would need to be added to firewatir for the above line to work (or the existing js_eval method could eb used instead). HAVING SAID THAT: The form defined atwww.monster.dedoes not have any buttons and does not have onsubmit defined in the form. so this sort of this thing: form(:index, 1).submit if form(:index, 1).onsubmit would not work. as Orde pointed out, the only thing that works for that form is fireing a click event on a specific link. browser.link(:id, 'ctl00_ctl00_searchBox_MessagizedButton1').click This link contains the on href javascript:AjaxSearch_DoSearchRedirect (). It is actually this function that ends up submitting the form. As there is no direct connection between this link and the form it is almost impossible for a mthod to identify this link as actually being the element that submits the form. This is a disaster if your software has to find forms and submit them on its own without knowing about them before hand. This problem seems to go from the hundreds to the millions very quickly - so, is there another solution. It seems that all the forms in question react to a keyboard return - i.e. they submit. The only thing is - firewatir does not have a way of fireing a keyboard event (as far as I know). If it did then i could imagine somthing like this working for every form: form(:index, 1).text_field(:index, 1).value=whatever #fill in the form with something form(:index, 1).text_field(:index, 1).click #this should activate any onfocus event handlers on the page form(:index, 1).press_enter #(as apposed to click) Does anyone know how this could be achieved from within firewatir? Thanks a million Jason. On 17 Jun., 00:07, orde ohil...@gmail.com wrote: Took a closer look. WORKS: http://www.jobware.de/ ff.form(:index, 1).text_field(:index, 1).value = ruby ff.form(:index, 1).submit DOESN'T WORK: http://www.monster.de ff.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 ff.form(:index, 1).submit BUT THIS WORKS: browser.form(:index, 1
[wtr-general] Re: using Rails routes
in principle - there is no reason that is should not work. except if depends on the mocks and stubs you are using for your testing. you need the full (ulr_for) resolution url name for the browser.goto as you need the mongral server running to generate the page in the browser, i am not so sure that it makes a lot of sense to mix up the two test areas. in the rails environment you are (or should be) testing your program with mocks and stubs which is entirely independant of an application server running or not. if you want to test the realworld output to the browser I would do that outside of rails, afterall it does not really matter what application generates the pages the you want to test. hope that is food for thought. jason On 17 Jun., 07:59, Macsig sigbac...@gmail.com wrote: Hello guys, I'm new to watir: I have just discovered it through Cucumber and Watir 101 screencast (http://vimeo.com/2871256). Right now I'm trying to use it with Cucumber and Rails (as Dave shows in the screencast). Here my question: is it possible to use Rails routes instead absolute URL? Something like Given /^I am on (.+)$/ do |page_name| BROWSER.goto(path_to(page_name)) end Unfortunately the code above doesn't work: when I run Cucumber the step passes but the browser tries to open 'file:///' Thanks and have a nice day! Sig --~--~-~--~~~---~--~~ 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: firewatir form submit working???
Orde, thanks for looking at this. unfortunately thats not the answer - maybe even a little off track. I am getting a lot cases where form.submit does not work as expected. another case is www.monster.de ff.form(:index, 1).text_field(:name, ctl00$ctl00$searchBox $_ptbKeywords).value = 12345 ff.form(:index, 1).submit The page renders no result from the form.submit (just a page refresh). I thought that this might have something to do with the fact that that the form has no submit buttons in it - so tried a from that does have input buttons defined: https://careers3.accenture.com/taleo/taleo.asp?countryname=Germany ff.frame(:index, 1).form(:index, 1).text_field(:name, jobNumberSearch).value = 12345 ff.frame(:index, 1).form(:index, 1).submit also here, the page renders no result from the form.submit (it just refreshes the page) however, this page works just fine: http://www.jobware.de/ ff.form(:index, 1).text_field(:index, 1).value = ruby ff.form(:index, 1).submit and because i thought it might have somthing to do with iframes being declaired on in the page i built a html document with the google search page in the iframe, that also worked as expected. So I really am stuck on why. I cannot figure out what the causing this behaviour - it least if I knew, could try fixing it. has anyone got any ideas? I am more looking for the cause, rather than a work around. thanks a million. Jason. On 15 Jun., 22:43, orde ohil...@gmail.com wrote: Looks like it's a cross-domain issue. This code: browser = Watir::IE.start('http://www.adecco.de/GERMAN/candidates/ jobsuche/Pages/DEJobSuche.aspx') puts browser.show_frames yields this message: frame index: 1 Access Denied, seehttp://wiki.openqa.org/display/WTR/FAQ#access-denied So, check outhttp://wiki.openqa.org/display/WTR/FAQ#access-denied. There are a few workarounds listed there (e.g. go directly to frame URL, add URL to browser's trusted sites, tweak etc/host file). Hope that helps. orde PS: I'm using IE7 + watir 1.8.6 + ruby 1.6.2. On Jun 15, 8:08 am, jason jason.franklin.sto...@gmail.com wrote: HI I have a simple case that i cannot seem to make work. i.e. fill out a form and submit it and see a new resulting page. here the real example: ff.goto(http://www.adecco.de/GERMAN/candidates/jobsuche/Pages/ DEJobSuche.aspx) ff.frame(:index, 1).form(:index, 1).text_field(:index , 1).set (hello) ff.frame(:index, 1).form(:index, 1).submit the submit_form method in firewatir does get called and the browser does recieve the .submit command but the page just rebuilds the form - even with the word hello that i set it with. and ideas why a page is not being generated. hoping that i am missing somthing very simple. thanks for your help jason. --~--~-~--~~~---~--~~ 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] firewatir form submit working???
HI I have a simple case that i cannot seem to make work. i.e. fill out a form and submit it and see a new resulting page. here the real example: ff.goto(http://www.adecco.de/GERMAN/candidates/jobsuche/Pages/ DEJobSuche.aspx) ff.frame(:index, 1).form(:index, 1).text_field(:index , 1).set (hello) ff.frame(:index, 1).form(:index, 1).submit the submit_form method in firewatir does get called and the browser does recieve the .submit command but the page just rebuilds the form - even with the word hello that i set it with. and ideas why a page is not being generated. hoping that i am missing somthing very simple. thanks for your help jason. --~--~-~--~~~---~--~~ 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: Page Load Time Out error
Hi venky, I use firewatir too and ended up tweaking the wait method in firefox.rb so that it uses busyflags. when the wait method times out (300 seconds) then it should raise and exception. if rescue the exception you can try to load the url again with ff.goto (url) - generally the page will then load properly. here my wait method. def wait(last_url = nil) #puts In wait function isLoadingDocument = start = Time.now while isLoadingDocument != 0 # puts #{BROWSER_VAR}=#{WINDOW_VAR}.getBrowser(); # {BROWSER_VAR}.selectedBrowser.webProgress.busyFlags isLoadingDocument = js_eval(#{BROWSER_VAR}=# {WINDOW_VAR}.getBrowser(); # {BROWSER_VAR}.selectedBrowser.webProgress.busyFlags) # isLoadingDocument = js_eval(#{BROWSER_VAR}=# {WINDOW_VAR}.getBrowser(); # {BROWSER_VAR}.webProgress.isLoadingDocument;) #puts Is browser still loading page: #{isLoadingDocument} #puts Is browser still loading page: #{isLoadingDocument} sleep(0.25) # Derek Berner 5/16/08 # Raise an exception if the page fails to load if (Time.now - start) 300 raise Page Load Timeout end end # Derek Berner 5/16/08 # If the redirect is to a download attachment that does not reload this page, this # method will loop forever. Therefore, we need to ensure that if this method is called # twice with the same URL, we simply accept that we're done. $jssh_socket.send(#{BROWSER_VAR}.contentDocument.URL;\n, 0) url = read_socket() if(url != last_url) # Check for Javascript redirect. As we are connected to Firefox via JSSh. JSSh # doesn't detect any javascript redirects so check it here. # If page redirects to itself that this code will enter in infinite loop. # So we currently don't wait for such a page. # wait variable in JSSh tells if we should wait more for the page to get loaded # or continue. -1 means page is not redirected. Anyother positive values means wait. jssh_command = var wait = -1; var meta = null; meta = # {BROWSER_VAR}.contentDocument.getElementsByTagName('meta'); if(meta != null) { var doc_url = # {BROWSER_VAR}.contentDocument.URL; for(var i=0; i meta.length;++i) { var content = meta[i].content; var regex = new RegExp(\^refresh$\, \i\); if(regex.test(meta[i].httpEquiv)) { var arrContent = content.split(';'); var redirect_url = null; if(arrContent.length 0) { if(arrContent.length 1) redirect_url = arrContent[1]; if(redirect_url != null) { regex = new RegExp(\^.*\ + redirect_url + \$\); if(!regex.test(doc_url)) { wait = arrContent[0]; } } break; } } } } wait; #puts command in wait is : #{jssh_command} jssh_command = jssh_command.gsub(/\n/, ) $jssh_socket.send(#{jssh_command}; \n, 0) wait_time =
[wtr-general] Re: How to get info by Watir script from page source?
how about... ie.html.match(/head.+?\/head/)[0] jason On 8 Jun., 08:35, Wesley Chen cjq@gmail.com wrote: Hi, Guys, I turn to one of the page in my system, view the page source, it displays: *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; !-- server01 -- html xmlns=http://www.w3.org/1999/xhtml; xmlns:v=urn:schemas-microsoft-com:vml head titleactive/title /head body /body /html* If I use *ie.html*, I can only get the code between html***/html I can use ie.document.body.innerHtml to get the code between body***/body 1. If I would like to get only the code between head***/head, how can I make it? 2. If I would like to get the *!-- server01 -- *, how can I make it? how can I get *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;?* 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: How to get info by Watir script from page source?
Hi Wesley. Only browser, window, document and body are defined vars. There seem to be absolutly not methods that can be applied to the head tag of a document (at least in firewatir). Maybe a work around for you would be to send the html to the hpricot parser and use that to parse out stuff you need in the document head. Jason On 8 Jun., 10:50, Wesley Chen cjq@gmail.com wrote: Hi, Jason, Thank you very much, it works. But really complex. Thanks. Wesley Chen. 2009/6/8 Jonny Xu jonn...@hotmail.com Hi Wesley, Hope this is what you want. http://www.rhinocerus.net/forum/lang-ruby/562943-html-method-watir-do... Best Regards, Jonny *From:* watir-general@googlegroups.com [mailto: watir-gene...@googlegroups.com] *On Behalf Of *Wesley Chen *Sent:* 2009年6月8日 14:36 *To:* Watir General *Subject:* [wtr-general] How to get info by Watir script from page source? Hi, Guys, I turn to one of the page in my system, view the page source, it displays: *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; !-- server01 -- html xmlns=http://www.w3.org/1999/xhtml; xmlns:v=urn:schemas-microsoft-com:vml head titleactive/title /head body /body /html* If I use *ie.html*, I can only get the code between html***/html I can use ie.document.body.innerHtml to get the code between body***/body 1. If I would like to get only the code between head***/head, how can I make it? 2. If I would like to get the *!-- server01 -- *, how can I make it? how can I get *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;?* 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: .set method is not working for firefox
Hi Kiran, works fine for the url you provide: ff.form(:name, AOLLoginForm).text_field(:id ,lgnId1).set(Hello World) best R Jason. On 4 Jun., 17:14, jason jason.franklin.sto...@gmail.com wrote: Hi Krian, I have just tried this out for you which works - so sorry - i cant reproduce the problem: ff.form.text_field(:index, 1).set(hello) jason On 4 Jun., 15:18, Kinnu kiranyajaman...@gmail.com wrote: Hi All, When I try to set some value to the text field (In Firefox) using .set (sample text) following error will appear C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:517:in `read_socket' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:445:in `js_eval' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:451:in `js_eval_method' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ MozillaBaseElement.rb:991:in `enabled?' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ MozillaBaseElement.rb:977:in `assert_enabled' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 266:in `focus' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 267:in `focus' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ htmlelements.rb:1340:in `set' Did anyone of you have faced this issue. If you have any solution for this please reply. Thanks in Advance, Krian Y --~--~-~--~~~---~--~~ 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: .set method is not working for firefox
can you post the entier error message you are getting On 8 Jun., 12:03, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hii Jason, I tried with the same piece of code and I am still getting the same error. Is it possible for you to send firewatir folder which you are using so that i can try with the same files. I have updated firewatir gem as well. Thanks and Regards, Kiran Y On Mon, Jun 8, 2009 at 3:22 PM, jason jason.franklin.sto...@gmail.comwrote: Hi Kiran, works fine for the url you provide: ff.form(:name, AOLLoginForm).text_field(:id ,lgnId1).set(Hello World) best R Jason. On 4 Jun., 17:14, jason jason.franklin.sto...@gmail.com wrote: Hi Krian, I have just tried this out for you which works - so sorry - i cant reproduce the problem: ff.form.text_field(:index, 1).set(hello) jason On 4 Jun., 15:18, Kinnu kiranyajaman...@gmail.com wrote: Hi All, When I try to set some value to the text field (In Firefox) using .set (sample text) following error will appear C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:517:in `read_socket' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:445:in `js_eval' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:451:in `js_eval_method' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ MozillaBaseElement.rb:991:in `enabled?' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ MozillaBaseElement.rb:977:in `assert_enabled' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 266:in `focus' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 267:in `focus' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ htmlelements.rb:1340:in `set' Did anyone of you have faced this issue. If you have any solution for this please reply. Thanks in Advance, Krian Y --~--~-~--~~~---~--~~ 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: Multiple lines in textarea
Your code is wrong - line is using puts ??? ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| puts item end) change to ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| item + \n ) Best R Jason On 8 Jun., 12:46, grzegorz.smaj...@gmail.com grzegorz.smaj...@gmail.com wrote: Hi, I face a problem with putting answers in textarea in new lines ex: I have a textarea: textarea name=multiChoiceAnswers rows=5 style=width:100% align=left I would like to put into that textarea answers in each line: [Answer1] [Answer2] [Answer3] When I create an array with answers: answers = [] answers = [answer1],[answer2],[answer3] then: ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| puts item end) I get the fallowing error: ArgumentError: comparison of String with 128 failed from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:381:in `' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:381:in `characters_in' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:368:in `type_by_character' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:334:in `set' Can any one advise? --~--~-~--~~~---~--~~ 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: Multiple lines in textarea
Oh and your text array should look as follows: answers = [answer1,answer2,answer3] On 8 Jun., 13:13, jason jason.franklin.sto...@gmail.com wrote: Your code is wrong - line is using puts ??? ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| puts item end) change to ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| item + \n ) Best R Jason On 8 Jun., 12:46, grzegorz.smaj...@gmail.com grzegorz.smaj...@gmail.com wrote: Hi, I face a problem with putting answers in textarea in new lines ex: I have a textarea: textarea name=multiChoiceAnswers rows=5 style=width:100% align=left I would like to put into that textarea answers in each line: [Answer1] [Answer2] [Answer3] When I create an array with answers: answers = [] answers = [answer1],[answer2],[answer3] then: ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| puts item end) I get the fallowing error: ArgumentError: comparison of String with 128 failed from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:381:in `' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:381:in `characters_in' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:368:in `type_by_character' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:334:in `set' Can any one advise? --~--~-~--~~~---~--~~ 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 the element attributes in the frame?
try somthing like ie.frame(:index, 1).form(:name, q).getAttribute(autocomplete) Jason On 8 Jun., 14:07, Wesley Chen cjq@gmail.com wrote: Hi, guys, By the following code, I can get google search text field's autocomplete attribute value. *require 'watir' ie=Watir::IE.goto(www.google.com) puts ie.element_by_xpath(//inp...@name='q']).getAttribute(autocomplete)* If the text filed is in a frame, but for frame, no element_by_xpath attribute. How can I get the google search text field attribute autocomplete? 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: How to get the element attributes in the frame?
sorry - ok course it does not. puts ie.frame(:index, 1).form(:name, q).id puts ie.frame(:index, 1).form(:name, q).text_field(:name, autocomplete ).inspect puts ie.frame(:index, 1).form(:name, q).text_field(:name, autocomplete ).id puts ie.frame(:index, 1).form(:name, q).text_field(:name, autocomplete ).type puts ie.frame(:index, 1).form(:name, q).text_field(:name, autocomplete ).value On 8 Jun., 14:40, Wesley Chen cjq@gmail.com wrote: Hi, Jason, Thank you for your quick reply. Are you sure the form has getAttribute method? When I try: puts ie.form(:name, q).getAttribute(autocomplete) I get error message: F:/Jython Project/RubyTest/lib/attach_ment.rb:4: undefined method `getAttribute' for #Watir::Form:0x3530fcc (NoMethodError) Thanks. Wesley Chen. On Mon, Jun 8, 2009 at 8:20 PM, jason jason.franklin.sto...@gmail.comwrote: try somthing like ie.frame(:index, 1).form(:name, q).getAttribute(autocomplete) Jason On 8 Jun., 14:07, Wesley Chen cjq@gmail.com wrote: Hi, guys, By the following code, I can get google search text field's autocomplete attribute value. *require 'watir' ie=Watir::IE.goto(www.google.com) puts ie.element_by_xpath(//inp...@name='q']).getAttribute(autocomplete)* If the text filed is in a frame, but for frame, no element_by_xpath attribute. How can I get the google search text field attribute autocomplete? 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: Changing Div Location Without Puts
looks like you might have a timing problem. Try adding sleep(1) instead of puts to see if this is the case. If this is the case you need to look at what you did before and if the browser really did finish before it got to this line. Jason On 5 Jun., 23:33, Win kinib...@gmail.com wrote: Hi folks, I'm using cucumber with watir frame-work for my testing. In my step file, I'm trying to move one of my div from one location to another location on a browser. Here is my code: When /^I move the card to the top area$/ do #puts active_empcard.style.TOP browser.div(:class = 'eeCard ui-draggable', :id = '0').style.TOP = 75px end I find a very strange behavior in this code. The div will not move to the new location unless I added puts statement (that I commented out in the above) prior to the setting. However, I am able to move the div by setting the value only (w/o adding puts statement prior to the setting) in the console. This is what I did: c:\MSS_Test\MSSconsole Type 'irb START' at the prompt. irb START login_page.goto = 0.838 browser.div(:class = 'eeCard ui-draggable', :id = '0').style.TOP = 100px = 100px Can someone help me explain this? I would like to do this without showing the old location of the div (by having puts statement prior to the setting). Thanks, Winata I would like to have no output on the screen for the old values of the TOP location. Can someone explain why and help me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: forms in subframes - elements not found
Check, Thanks for the details solutions. In general - i can say that this in not a general bug in the firewatir code - in fact firewatir does find elements of objects in frames - most of the time! Now comes what I have found out until now. After a lot debugging and running after phantom bugs - i have finally found out what is at the root of the problem. It lies in the html code on the page: form method=get name=lay0803234_src350a action=snippet_freie_stellen_ergebnis.htm/ Note the close slash / at the end of the statement which closes the form statement. In the html code, this statement is followed by the select lists, inputs and buttons etc. On the face of it, this seems wrong - according to everything I have seen until now the /form statement should come after the all the form elements (select lists, buttons and inputs etc) have been declaired (but I am not an html guru - so I am not sure about this). What is interesting is that firefox iteself can deal with this - the form is displayed correctly and works fine. In fact looking at the DOM with firebug firefox knows everything about the elements of the form object. Unfortunately firewatir cannot get hold of the information for some reason and I am not a javascript guru - I cannot figure it what is going wrong. - but I have made these observations: 1. ff.frame(:index, 1).froms The above statement uses the firewatir locate_tagged_elements to find the forms. This method will not find any form that which closes on itself. i.e. form name=hello/ 2. ff.frame(:index, 1).form(:index, 1).name This uses locate_tagged_element to find the form. This will locate a form that closes on iteself. 3. ff.frame(:index, 1).form(:index, 1).selects_lists This (logically - will not find any select lists in the form). 4. ff.frame(:index, 1).form(:index, 1).select_list(:index, 1).name This (unlogically) does not find the select list for the form that closes on itself. Has any one any idea why the javascript code being sent to firefox through jssh is not working properly (not finding the things) in a case like this. Note the url of the page causeing this is: http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/jobboerse.aspx I small note on this and the conditions that i have to work in (god given): 1. I cannot use IE or watir 2. I can only use Firefox and firewatir 3. I cannot tell the programmer to change the code. 4. I need the contents of forms Any brillinat ideas out there?? Please let me know. Thanks a million Jason. On 5 Jun., 20:37, Chuck van der Linden sqa...@gmail.com wrote: Ok I've not tried this, but as far as I know you COULD install the watir gem, you just could not run it with the browser set to IE since yes obviously you don't have an IE browser on your platform. Mostly I gave that as an easy way to provide a tiny bit of sample code where you could quickly show (on a windows system) that the script worked on IE and not on Firefox, which helps to isolate the source of the bug (although I see you already found the code that needs to change).. I do feel compelled to ask one question however.. the site you are testing, is it restricted to only users of firefox, or is it a public site accesable by multiple browsers? if the latter shouldn't you be testing that it renders and operates properly on more than a single browser platform? Perhaps by using a Virtual Machine to run Windows so you could test against IE? or using chromewatir or safariwatir as well? (presuming you want to test on the smaller marketshare browsers) I would think testing the site against what only a portion of people use to browse the web (presuming we believe these folks http://marketshare.hitslink.com/browser-market-share.aspx?qprid=1 FF is only about aquarter of users (seems low, but I can't find other stats just now)). In any case regardless of the exact marketshare numbers, single browser testing leaves you open for a number of potential problems on other platforms. (I run all my testbed systems off VM's.. I can tell you that IE and Watir both run fine from one, at least under Hyper-V.. I've not tried other platforms, but I've no reason to expect that VMWare or another virtualization platform would not work equally well) On Jun 4, 1:05 am, jason jason.franklin.sto...@gmail.com wrote: Chuck, Thanks a lot for your thoughs. Of course you are right with the work around - but this does not work for me because I have a large number of sites that often change so I don't know / cannot rely on the structure of the websites - my program has to find this out for itself and operate the forms accordingly and make sure they produce a valid output - which is an impossible task if it is not clear which elements belong to which forms and where they are in the frames and or nested frames. In the example i gave there are 6 select lists and 3 forms in 2 different frames - which is a pretty common
[wtr-general] Re: forms in subframes - elements not found
FYI the solution above is not quite right.. i am working on the change and will post it later on today. On 4 Jun., 13:17, jason jason.franklin.sto...@gmail.com wrote: ok - so just for documentations sake i found the bug in the firewatir locate_tagged_element code in MozillaBaseElement.rb this.. if(@container.class == FireWatir::Firefox || @container.class == Frame) needs to be changed to this. if(@container.class == FireWatir::Firefox || @container.class == Frame || @container.container.class == FireWatir::Firefox || @container.container.class == Frame) There are three places in the method where this needs to be changed and :container needs to be added to the list of attr_accessors in the classes Frame and Form. I hope this helps for anyone with the same issue. I cannot believe that has not cropped up until now - it is such a basic bug. anyway I will post this in my bug report too. Jason. On 4 Jun., 10:05, jason jason.franklin.sto...@gmail.com wrote: Chuck, Thanks a lot for your thoughs. Of course you are right with the work around - but this does not work for me because I have a large number of sites that often change so I don't know / cannot rely on the structure of the websites - my program has to find this out for itself and operate the forms accordingly and make sure they produce a valid output - which is an impossible task if it is not clear which elements belong to which forms and where they are in the frames and or nested frames. In the example i gave there are 6 select lists and 3 forms in 2 different frames - which is a pretty common case - and regardless if i use :name, :index :id or any other attribute to locate the select list in the example - it does not work. I have posted this as a bug in the jira system eventhough I am still trying to find out if this is a bug - or I am missing something - the thing is - if this is a bug - then it looks like a show stopper for me - but a bug that probably wont be fixed for some time to come - so either i stop the project or debug / patch firewatir - which i would totally like to avoid. You also mentioned this as a workaround require 'watir' Watir::Browser.default = 'ie' #sets browser preference I cannot install watir becasue it requires a windows environment - or I am I missing somthing here too? please let me know. thanks a million jason. On 3 Jun., 21:00, Chuck van der Linden sqa...@gmail.com wrote: Hey I know you want to look for the select_list INSIDE the form, (perhaps to verify it's in the right 'place' within the dom etc) but if the intent is to manipulate the list, and you are able to identify it by ID value, then as a workaround until this problem is corrected, why not just leave out the form and look for it inside the frame? I mean given that you are identifying it by ID and not Name or Class, there should only be ONE of them on the page if it's proper HTML. Yes this doesn't let you validate that someone didn't move the thing outside of the form, or address any other reason you have for wanting to look for it 'inside' the form (which I understand perfectly, I do that kind of thing all the time with navigation links within a specific div etc) but it might at least let you get around this for now.. (and beats the heck out of having to setup a windows VM or something just so you can run the scripts) It also seems to me like you've got a pretty valid (and thanks to the public site, easily reproducable) bug here, so you might want to create a Jira item for it to see that it gets fixed http:// jira.openqa.org/browse/WTR FWIW I think this code should run on either browser with a simple change of the default browser value require 'watir' Watir::Browser.default = 'ie' #sets browser preference url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx browser = Watir::Browser.new browser.goto(url) browser.frame(:index, 1).form(:name, lay0803234_src350a).select_list (:id, LOV6) .inspect --Chuck On Jun 3, 10:25 am, jason jason.franklin.sto...@gmail.com wrote: Aidy. thanks for the feedback!! ff.table(:index, 1).rows[0].html is the same as ff.table(:index, 1).row(:index, 1).html rows[0] refers to the first element of the array as row(:index, 1) referers to the location of the first row in the dom using the locate_taged_element method. however - i see you have access to both IE and Firefox. could you please please run this code and tel me if you get the same results as i do?? This should work for IE and Firefox (watir and firewatir) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).inspect This should only work for IE
[wtr-general] Re: forms in subframes - elements not found
Chuck, Thanks a lot for your thoughs. Of course you are right with the work around - but this does not work for me because I have a large number of sites that often change so I don't know / cannot rely on the structure of the websites - my program has to find this out for itself and operate the forms accordingly and make sure they produce a valid output - which is an impossible task if it is not clear which elements belong to which forms and where they are in the frames and or nested frames. In the example i gave there are 6 select lists and 3 forms in 2 different frames - which is a pretty common case - and regardless if i use :name, :index :id or any other attribute to locate the select list in the example - it does not work. I have posted this as a bug in the jira system eventhough I am still trying to find out if this is a bug - or I am missing something - the thing is - if this is a bug - then it looks like a show stopper for me - but a bug that probably wont be fixed for some time to come - so either i stop the project or debug / patch firewatir - which i would totally like to avoid. You also mentioned this as a workaround require 'watir' Watir::Browser.default = 'ie' #sets browser preference I cannot install watir becasue it requires a windows environment - or I am I missing somthing here too? please let me know. thanks a million jason. On 3 Jun., 21:00, Chuck van der Linden sqa...@gmail.com wrote: Hey I know you want to look for the select_list INSIDE the form, (perhaps to verify it's in the right 'place' within the dom etc) but if the intent is to manipulate the list, and you are able to identify it by ID value, then as a workaround until this problem is corrected, why not just leave out the form and look for it inside the frame? I mean given that you are identifying it by ID and not Name or Class, there should only be ONE of them on the page if it's proper HTML. Yes this doesn't let you validate that someone didn't move the thing outside of the form, or address any other reason you have for wanting to look for it 'inside' the form (which I understand perfectly, I do that kind of thing all the time with navigation links within a specific div etc) but it might at least let you get around this for now.. (and beats the heck out of having to setup a windows VM or something just so you can run the scripts) It also seems to me like you've got a pretty valid (and thanks to the public site, easily reproducable) bug here, so you might want to create a Jira item for it to see that it gets fixed http:// jira.openqa.org/browse/WTR FWIW I think this code should run on either browser with a simple change of the default browser value require 'watir' Watir::Browser.default = 'ie' #sets browser preference url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx browser = Watir::Browser.new browser.goto(url) browser.frame(:index, 1).form(:name, lay0803234_src350a).select_list (:id, LOV6) .inspect --Chuck On Jun 3, 10:25 am, jason jason.franklin.sto...@gmail.com wrote: Aidy. thanks for the feedback!! ff.table(:index, 1).rows[0].html is the same as ff.table(:index, 1).row(:index, 1).html rows[0] refers to the first element of the array as row(:index, 1) referers to the location of the first row in the dom using the locate_taged_element method. however - i see you have access to both IE and Firefox. could you please please run this code and tel me if you get the same results as i do?? This should work for IE and Firefox (watir and firewatir) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).inspect This should only work for IE: (watir only) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) .inspect Thanks a million On 3 Jun., 17:03, aidy lewis aidy.le...@googlemail.com wrote: Hi Jason How then would you explain this? require 'rubygems' require 'watir' ['watir', 'firewatir'].each { | g | require g } ie = Watir::IE.new ff = FireWatir::Firefox.new [ie, ff].each { |b| b.goto(http://www.google.com;) } ff.table(:index, 1).rows[0].html ie.table(:index, 1).rows[0].html Aidy 2009/6/3 jason jason.franklin.sto...@gmail.com: firewatir index for all elements starts and frames starts with 1 index 0 should be the root document (but its not :-( ) so thanks for the thought jason.- 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
[wtr-general] Re: Towards migrating to Watir.com
Hi Alistair, With lack of a better alternative - wordpress - or any blog - is a pain for the user searching for structured information. Do you think 37signals would sponsor project space in thier basecamp. would that meet the requirements?? jason. On 4 Jun., 06:23, Alister Scott alister.sc...@gmail.com wrote: Hi Everyone, I have looked into many options and can't find a free/cheap option to host Confluence for watir.com. Amazon EC2 will be at least US$80 per month (~$1000 per year) so we would need to find a sponsor for this. On top of this, we would need to configure and maintain (backup) Confluence ourselves which is additional effort. In moving forward I have asked why we are wanting to do what we're doing. I understand there are two main reasons: 1) The current site (http://wtr.rubyforge.org/) is old, hard to update by multiple people, and not very dynamic, meaning the information on here is often not up to date. 2) It is believed the openqa.org site is taking on a more selenium focus and therefore Watir might be better hosted elsewhere (dedicated instance). One solution I propose is that we use wordpress.com as a CMS to host watir.com (custom domain name mapping costs $10USD per year) and besides this there is no charge for up to 3GB content and unlimited traffic. The benefit of using wordpress.com is that it is very fast, has a high google pagerank, is very easy to configure and use, and allows multiple authors for the site. I have set a very quick demo here: http://watirweb.wordpress.com/The great thing is that the site has RSS feeds, and using the widgets we can display various content dynamically. This solves issue 1 above, but the issue 2 still exists. I personally think issue 2 has died down a bit of late, and that we could possibly continue using openqa.org for the wiki and JIRA for the immediate future, until something changes. We can just link to this site from watir.com I look forward to hearing your ideas and feedback about this. Cheers, Alister --~--~-~--~~~---~--~~ 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: forms in subframes - elements not found
ok - so just for documentations sake i found the bug in the firewatir locate_tagged_element code in MozillaBaseElement.rb this.. if(@container.class == FireWatir::Firefox || @container.class == Frame) needs to be changed to this. if(@container.class == FireWatir::Firefox || @container.class == Frame || @container.container.class == FireWatir::Firefox || @container.container.class == Frame) There are three places in the method where this needs to be changed and :container needs to be added to the list of attr_accessors in the classes Frame and Form. I hope this helps for anyone with the same issue. I cannot believe that has not cropped up until now - it is such a basic bug. anyway I will post this in my bug report too. Jason. On 4 Jun., 10:05, jason jason.franklin.sto...@gmail.com wrote: Chuck, Thanks a lot for your thoughs. Of course you are right with the work around - but this does not work for me because I have a large number of sites that often change so I don't know / cannot rely on the structure of the websites - my program has to find this out for itself and operate the forms accordingly and make sure they produce a valid output - which is an impossible task if it is not clear which elements belong to which forms and where they are in the frames and or nested frames. In the example i gave there are 6 select lists and 3 forms in 2 different frames - which is a pretty common case - and regardless if i use :name, :index :id or any other attribute to locate the select list in the example - it does not work. I have posted this as a bug in the jira system eventhough I am still trying to find out if this is a bug - or I am missing something - the thing is - if this is a bug - then it looks like a show stopper for me - but a bug that probably wont be fixed for some time to come - so either i stop the project or debug / patch firewatir - which i would totally like to avoid. You also mentioned this as a workaround require 'watir' Watir::Browser.default = 'ie' #sets browser preference I cannot install watir becasue it requires a windows environment - or I am I missing somthing here too? please let me know. thanks a million jason. On 3 Jun., 21:00, Chuck van der Linden sqa...@gmail.com wrote: Hey I know you want to look for the select_list INSIDE the form, (perhaps to verify it's in the right 'place' within the dom etc) but if the intent is to manipulate the list, and you are able to identify it by ID value, then as a workaround until this problem is corrected, why not just leave out the form and look for it inside the frame? I mean given that you are identifying it by ID and not Name or Class, there should only be ONE of them on the page if it's proper HTML. Yes this doesn't let you validate that someone didn't move the thing outside of the form, or address any other reason you have for wanting to look for it 'inside' the form (which I understand perfectly, I do that kind of thing all the time with navigation links within a specific div etc) but it might at least let you get around this for now.. (and beats the heck out of having to setup a windows VM or something just so you can run the scripts) It also seems to me like you've got a pretty valid (and thanks to the public site, easily reproducable) bug here, so you might want to create a Jira item for it to see that it gets fixed http:// jira.openqa.org/browse/WTR FWIW I think this code should run on either browser with a simple change of the default browser value require 'watir' Watir::Browser.default = 'ie' #sets browser preference url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx browser = Watir::Browser.new browser.goto(url) browser.frame(:index, 1).form(:name, lay0803234_src350a).select_list (:id, LOV6) .inspect --Chuck On Jun 3, 10:25 am, jason jason.franklin.sto...@gmail.com wrote: Aidy. thanks for the feedback!! ff.table(:index, 1).rows[0].html is the same as ff.table(:index, 1).row(:index, 1).html rows[0] refers to the first element of the array as row(:index, 1) referers to the location of the first row in the dom using the locate_taged_element method. however - i see you have access to both IE and Firefox. could you please please run this code and tel me if you get the same results as i do?? This should work for IE and Firefox (watir and firewatir) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).inspect This should only work for IE: (watir only) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) .inspect Thanks a million
[wtr-general] Re: .set method is not working for firefox
Hi Krian, I have just tried this out for you which works - so sorry - i cant reproduce the problem: ff.form.text_field(:index, 1).set(hello) jason On 4 Jun., 15:18, Kinnu kiranyajaman...@gmail.com wrote: Hi All, When I try to set some value to the text field (In Firefox) using .set (sample text) following error will appear C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:517:in `read_socket' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:445:in `js_eval' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ container.rb:451:in `js_eval_method' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ MozillaBaseElement.rb:991:in `enabled?' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ MozillaBaseElement.rb:977:in `assert_enabled' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 266:in `focus' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 267:in `focus' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ htmlelements.rb:1340:in `set' Did anyone of you have faced this issue. If you have any solution for this please reply. Thanks in Advance, Krian Y --~--~-~--~~~---~--~~ 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: forms in subframes - elements not found
Chuck, thanks a million for the feedback. This seems to be problem with firewatir. The following works fine. url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).inspect This does not: url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) .inspect which results in the following error: MozillaBaseElement.rb:973:in `assert_exists': Unable to locate element, using :id, LOV6 (Watir::Exception::UnknownObjectException) I had a look at the firewatir code and see this in the locate_tagged_element method which is total crap because if the container class is not a frame then the search of the object will default to the base document and not the frame!! which of course explains why it is not working. if(@container.class == FireWatir::Firefox || @container.class == Frame) jssh_command += var elements_#{tag} = null; elements_#{tag} = # {DOCUMENT_VAR}.getElementsByTagName(\#{tag}\); Totally, totally rubbish and makes firewatir vertually unuseable for anyone exploring forms within frames. and even more unfortunate is the fact that i cannot use IE because I am in a unix environement. bugger, bugger, bugger. On 2 Jun., 20:33, Chuck van der Linden sqa...@gmail.com wrote: On May 29, 7:58 am, jason jason.franklin.sto...@gmail.com wrote: Michael, thanks for the feedback. as mentioned above that works fine - however is not much use becasue the select list has no relationship to the form that contains it. no, but it would be the correct list (unless your devs are abusing hml) since there is only one instance of that ID allowed, so it would be selecting the corrrect selection list. This seems perhaps to be something limited to Firewatir however.. since with Watir and IE7 as my browser I'm able to perform the function you indicated browser.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) without a problem. One thing to check, use .show_frames and make sure you have the right one. with IE it's index 1 for the frame you want. There is another frame on the page but that's index 2. I'm not sure if it's possible, but maybe good to check that the order is still the same in FF. Can you do it from IRB or a watircraft console, and see if you can flash the form ? browser.frame(:index, 1).form(:name, lay0803234_src350a).flash that would tell you if you have the right container. for the list and can address it. Not sure if it helps to know I can't duplicate your issue when using IE, but there it is. your code is, in theory anyway (once we eliminate the index for :index typo), sound. so I'd think it ought to work with FF as well as with IE --~--~-~--~~~---~--~~ 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: forms in subframes - elements not found
firewatir index for all elements starts and frames starts with 1 index 0 should be the root document (but its not :-( ) so thanks for the thought jason. On 3 Jun., 15:29, aidy lewis aidy.le...@googlemail.com wrote: ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) .inspect Try :index, 0 Aidy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: forms in subframes - elements not found
Aidy. thanks for the feedback!! ff.table(:index, 1).rows[0].html is the same as ff.table(:index, 1).row(:index, 1).html rows[0] refers to the first element of the array as row(:index, 1) referers to the location of the first row in the dom using the locate_taged_element method. however - i see you have access to both IE and Firefox. could you please please run this code and tel me if you get the same results as i do?? This should work for IE and Firefox (watir and firewatir) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).inspect This should only work for IE: (watir only) url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) .inspect Thanks a million On 3 Jun., 17:03, aidy lewis aidy.le...@googlemail.com wrote: Hi Jason How then would you explain this? require 'rubygems' require 'watir' ['watir', 'firewatir'].each { | g | require g } ie = Watir::IE.new ff = FireWatir::Firefox.new [ie, ff].each { |b| b.goto(http://www.google.com;) } ff.table(:index, 1).rows[0].html ie.table(:index, 1).rows[0].html Aidy 2009/6/3 jason jason.franklin.sto...@gmail.com: firewatir index for all elements starts and frames starts with 1 index 0 should be the root document (but its not :-( ) so thanks for the thought jason. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Need help on jssh installation for firefox
Chethan, try starting firefox from the command line with the jssh option ... firefox -jssh then start a terminal session from the command line telnet localhost 9997 you should then get a connection with the following feedback: Welcome to the Mozilla JavaScript Shell! if that is not working then somthing is wrong with the jssh installation... Jason. On 2 Jun., 09:44, Chethan chethan2...@gmail.com wrote: Hi, I started working on Firewatir, I have installed firewatir using new installation procedure as described in the Watir overview page. I have even installed the jssh as per the instructions. I have done lot of scripting for IE. I started with the firewatir example getting following error `set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option (Watir::Exception::UnableToStartJSShException) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/ firefox.rb:161:in `initialize' Pls help me out to come out of this issue. 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 -~--~~~~--~~--~--~---
[wtr-general] Re: forms in subframes - elements not found
ok so i have taken a look at the locate_tagged_element method and it looks like it cannot handle elements of objects in nested frames! Can anyone confirm this? i.e. anyone out there that can get elements (i.e. the select list) of a form sitting in a nested frame thanks Jason. On 29 Mai, 21:34, George george.sand...@gmail.com wrote: It looks like this select list is in an IFRAME tag, so this might be a difficult task to do. On May 29, 7:59 am, jason jason.franklin.sto...@gmail.com wrote: Hi Alan - sorry the index instead of :index in my original message was a typo. so ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list (:id, LOV6) does not work either. On May 27, 11:14 pm, Alan Ark ar...@compli.com wrote: Try ff.frame(:index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) :index rather than index -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of jason Sent: Wednesday, May 27, 2009 6:02 AM To: Watir General Subject: [wtr-general] forms in subframes - elements not found Hi - here is the issue, to get some element of a form - you can do this... url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.form(:name, lay0803234_src350a).select_list(:id, LOV6) however, if the form happens to be in a subframe, like this ff.frame(index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) then firewatir terminates with `assert_exists': Unable to locate element using :id, LOV6 (Watir::Exception::UnknownObjectException) does anyone have any ideas on this?? help would be highly appreciated!! Jason. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Need help on jssh installation for firefox
ok, when you installed the jssh extention did the firefox plugin manager tell you that the installation was ok did it restart the browser after the installation - if not , then try installing it again. On 2 Jun., 11:13, Chethan chethan2...@gmail.com wrote: I tried it. still no use, I did the Jssh installation fromhttp://wiki.openqa.org/display/WTR/FireWatir+Installation#FireWatirIn... link i started firefox using firefox.exe -jssh, Then i did telnet localhost 9997, this gave me following error Connecting To localhost...Could not open connection to the host, on port 9997: C onnect failed Thanks, 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 -~--~~~~--~~--~--~---
[wtr-general] Re: How I can verify whether all the images of a web page have been loaded or not?
Hi Maumita, I had problems with pages comming back as loaded even though were still loading and so i changed the wait method slightly and it works fine now. def wait(last_url = nil) #puts In wait function isLoadingDocument = start = Time.now while isLoadingDocument != 0 # puts #{BROWSER_VAR}=#{WINDOW_VAR}.getBrowser(); # {BROWSER_VAR}.selectedBrowser.webProgress.busyFlags isLoadingDocument = js_eval(#{BROWSER_VAR}=# {WINDOW_VAR}.getBrowser(); # {BROWSER_VAR}.selectedBrowser.webProgress.busyFlags) # isLoadingDocument = js_eval(#{BROWSER_VAR}=# {WINDOW_VAR}.getBrowser(); # {BROWSER_VAR}.webProgress.isLoadingDocument;) #puts Is browser still loading page: #{isLoadingDocument} #puts Is browser still loading page: #{isLoadingDocument} sleep(0.25) # Derek Berner 5/16/08 # Raise an exception if the page fails to load if (Time.now - start) 300 raise Page Load Timeout end end # Derek Berner 5/16/08 # If the redirect is to a download attachment that does not reload this page, this # method will loop forever. Therefore, we need to ensure that if this method is called # twice with the same URL, we simply accept that we're done. $jssh_socket.send(#{BROWSER_VAR}.contentDocument.URL;\n, 0) url = read_socket() if(url != last_url) # Check for Javascript redirect. As we are connected to Firefox via JSSh. JSSh # doesn't detect any javascript redirects so check it here. # If page redirects to itself that this code will enter in infinite loop. # So we currently don't wait for such a page. # wait variable in JSSh tells if we should wait more for the page to get loaded # or continue. -1 means page is not redirected. Anyother positive values means wait. jssh_command = var wait = -1; var meta = null; meta = # {BROWSER_VAR}.contentDocument.getElementsByTagName('meta'); if(meta != null) { var doc_url = # {BROWSER_VAR}.contentDocument.URL; for(var i=0; i meta.length;++i) { var content = meta[i].content; var regex = new RegExp(\^refresh$\, \i\); if(regex.test(meta[i].httpEquiv)) { var arrContent = content.split(';'); var redirect_url = null; if(arrContent.length 0) { if(arrContent.length 1) redirect_url = arrContent[1]; if(redirect_url != null) { regex = new RegExp(\^.*\ + redirect_url + \$\); if(!regex.test(doc_url)) { wait = arrContent[0]; } } break; } } } } wait; #puts command in wait is : #{jssh_command} jssh_command = jssh_command.gsub(/\n/, ) $jssh_socket.send(#{jssh_command}; \n, 0) wait_time = read_socket(); #puts wait time is : #{wait_time} begin wait_time = wait_time.to_i if(wait_time != -1) sleep(wait_time) # Call
[wtr-general] Re: Need help on jssh installation for firefox
did you install the jssh firefox plugin??? On 2 Jun., 14:05, Chethan chethan2...@gmail.com wrote: I installed the Firewatir with new method rather then gem install firewatir command, I done that through gem install watir online how the new Watir overview describes. Thanks, Chethan On Jun 2, 3:04 pm, Chethan chethan2...@gmail.com wrote: Hi, I am using window-Xp(sp2) my Firefox version is 3.0.10. Rgds, 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 -~--~~~~--~~--~--~---
[wtr-general] forms in subframes - elements not found
Hi - here is the issue, to get some element of a form - you can do this... url = http://www.siemens.de/jobs/jobs_bewerbung/jobboerse/Seiten/ jobboerse.aspx ff = FireWatir::Firefox.new ff.goto(url) ff.form(:name, lay0803234_src350a).select_list(:id, LOV6) however, if the form happens to be in a subframe, like this ff.frame(index, 1).form(:name, lay0803234_src350a).select_list(:id, LOV6) then firewatir terminates with `assert_exists': Unable to locate element using :id, LOV6 (Watir::Exception::UnknownObjectException) does anyone have any ideas on this?? help would be highly appreciated!! Jason. --~--~-~--~~~---~--~~ 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: javascript popup window not responding to startClicker
oh my god! well done!!! I say this without having tried it out - but it seems so obvious!. I must say this whole frame thing is a pain in the a** I will let you know how it integrate it - thanks a million. !!! On 14 Mai, 07:49, jarodzz jaro...@gmail.com wrote: Hi, Jason. After hacked a little in def startClicker, I have it worked within my iframe. all you got to do is to update the first line of startClicker to locate the right frame. e.g. original one: jssh_command = var win = #{BROWSER_VAR}.contentWindow; if you want click something in frame A: jssh_command = var win = # {BROWSER_VAR}.contentWindow.document.getElementById(# {frame_id}).contentWindow; you can update it a little to make a work more gracefully. Hope it works. On May 13, 12:30 am, jason jason.franklin.sto...@gmail.com wrote: I am on a mac and linux with firefox so i cannot use this Autoitx thing that everyone seems to be using to click away javascript popups when then they appear. the code below works most of the time - but for some reason no the websitehttp://www.stepstone.de The pop appear - but it does not get clicked away.!! any ideas out there?? ff = FireWatir::Firefox.new ff.goto(http://www.stepstone.de;) ff.startClicker(ok) ff.frame(:name, maincontent).frame(:name, content).image(:name, Search).click Thanks a million. Jason. --~--~-~--~~~---~--~~ 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: Traversing nested elements
Gofu, I am not quite sure what you need. you can select any element and ask it for containing elements. for example: ff.frame(:index, 1).links gives you all the links in the container frame (the first one). ff.form(:index,2).links gives you all the links within the second form on the page. does that make any sence?? On 13 Mai, 09:31, Gofu thanapoom.chareons...@gmail.com wrote: Thank you jason, but i dont know whether they are links or tables (they sometimes change). I might be able to use decisions to write a routine for each element type seperately. Do you know how to do this in Watir? On May 12, 11:22 pm, jason jason.franklin.sto...@gmail.com wrote: not sure if this helps - but it might be a start ff.tables.each do |table| table.links.each do |link| link.click #for example end end hope that helps. On 12 Mai, 15:49, Gofu thanapoom.chareons...@gmail.com wrote: Hello everyone, I have a website that is generated dynamically (jsp). I would like to use the help of Watir to traverse through all of the many levels of nested tables/links in this site. The problem is that I can't be certain about the attributes (name, id) of the tables/links because when the server updates, the content changes. The depth of the nesting and the width(number of elements) of the branching and the type of the elements are not known in advance. For example, you have tr td a /a /td /tr or sometimes tr td tr td a /a /td td a /a /td /tr /td /tr The links are nested in the table and I want to click all these links using Watir, but not other links on the page, (only the ones in the table). I'm still very new to Watir. Is it the right tool for this task? Million 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 -~--~~~~--~~--~--~---
[wtr-general] Re: Traversing nested elements
not sure if this helps - but it might be a start ff.tables.each do |table| table.links.each do |link| link.click #for example end end hope that helps. On 12 Mai, 15:49, Gofu thanapoom.chareons...@gmail.com wrote: Hello everyone, I have a website that is generated dynamically (jsp). I would like to use the help of Watir to traverse through all of the many levels of nested tables/links in this site. The problem is that I can't be certain about the attributes (name, id) of the tables/links because when the server updates, the content changes. The depth of the nesting and the width(number of elements) of the branching and the type of the elements are not known in advance. For example, you have tr td a /a /td /tr or sometimes tr td tr td a /a /td td a /a /td /tr /td /tr The links are nested in the table and I want to click all these links using Watir, but not other links on the page, (only the ones in the table). I'm still very new to Watir. Is it the right tool for this task? Million 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 -~--~~~~--~~--~--~---
[wtr-general] javascript popup window not responding to startClicker
I am on a mac and linux with firefox so i cannot use this Autoitx thing that everyone seems to be using to click away javascript popups when then they appear. the code below works most of the time - but for some reason no the website http://www.stepstone.de The pop appear - but it does not get clicked away.!! any ideas out there?? ff = FireWatir::Firefox.new ff.goto(http://www.stepstone.de;) ff.startClicker(ok) ff.frame(:name, maincontent).frame(:name, content).image(:name, Search).click Thanks a million. Jason. --~--~-~--~~~---~--~~ 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::IE.new - how does the IE object differ from a normal Windows IE instance?
Brett, thanks. Unfortunately, but interestingly, that doesn't make a difference. On May 13, 3:17 am, Bret Pettichord b...@pettichord.com wrote: You can also try Watir::IE.new_process, which starts IE using a different mechanism, closer to what happens when you start it manually. Bret --~--~-~--~~~---~--~~ 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::IE.new - how does the IE object differ from a normal Windows IE instance?
I think I need to dig around and understand these redirections, but they're basically related to AB variation testing... Thanks for your thoughts! Jason On May 13, 1:20 am, Nathan Lane nathamberl...@gmail.com wrote: The Watir IE object is instantiated through OLE (I believe or it could be COM), which is done over a server-like connection, whereas running IE actually starts the entire program from executable. This may not be entirely correct though, as I do not fully understand how OLE or COM work. IE is tightly integrated into the system however, for example if you were to open an Explorer window, normally used to browse files on your local system, and enter the HTTP address to a web site in the address bar, the Explorer window would become an Internet Explorer window. There are likely some differences between running IE as an executable and running IE as an OLE object, but what they are is not known to me. It may also be possible that the redirects caused by Google aren't always necessary and don't occur in certain situations. You might dig more in that direction. Why is Google redirecting in up to ten different ways? Those are my thoughts. Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Watir::IE.new - how does the IE object differ from a normal Windows IE instance?
The question: how does the Internet Explorer object created via Watir (Watir::IE.new) differ from an Internet Explorer object opened the traditional way via Windows? I'm not sure it's supposed to be different, but I'm observing the following: We've created some AB testing variations using the Google Website Optimizer. The root page has 10 different variations. When loading the root page within IE as loaded via Windows (C: \Program Files (x86)\Internet Explorer\iexplore.exe) the root page effectively redirects to any of the 10 variants - ./0/ through to ./ 9/. i.e. http://{website}.com/9/ When loading the root page via an IE instance created via IRB ( Watir::IE.new or Watir::IE.start() ) this simply doesn't occur. The redirect to ./x/ doesn't happen, the page stays at the root. There's some javascript within the page that should assist this redirection and it simply doesn't appear to happen. By all other accounts the page is functionally correct, i.e. all other javascript loads and functions as expected. I'm worried the implementation of the AB variations may not be exactly correct, but is there something obvious about the Watir IE instance I don't understand? Is the Watir IE object different in any obvious way to a 'normal' Windows IE object that might cause this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: show form select_list objects text
Thanks for the suggestion. unfortunately it dont work :-( contents = ff.form(:index, 1).select_list(:index, 1).getAllObjects returns a empty string. On 26 Apr., 00:21, George george.sand...@gmail.com wrote: Hi there, If you're looking to get all the options in a select list and put it into an array, you can use this: contents = ff.form(:index, 1).select_list[1].getAllObjects -George On Apr 25, 1:25 pm, jason jason.franklin.sto...@gmail.com wrote: I have looked around and found no love on this subject. I would like to discover the text of a forms select list - is this at all possible? i.e ff.form(:index, 1).select_list[1].each do |option| puts option.inspect end Results in this output - but does not include the text in the option: option value=100Hello/option name: type: id: value: 100 disabled: false It would have though that the following would work: ff.form(:index, 1).select_list[1].each do |option| puts option.text #or puts option.inner_text end but - no love. any ideas would be very highly appreciated. Thanks a million. --~--~-~--~~~---~--~~ 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: show form select_list objects text
Ah getAllContents Thanks!! works. On 27 Apr., 10:11, jason jason.franklin.sto...@gmail.com wrote: Thanks for the suggestion. unfortunately it dont work :-( contents = ff.form(:index, 1).select_list(:index, 1).getAllObjects returns a empty string. On 26 Apr., 00:21, George george.sand...@gmail.com wrote: Hi there, If you're looking to get all the options in a select list and put it into an array, you can use this: contents = ff.form(:index, 1).select_list[1].getAllObjects -George On Apr 25, 1:25 pm, jason jason.franklin.sto...@gmail.com wrote: I have looked around and found no love on this subject. I would like to discover the text of a forms select list - is this at all possible? i.e ff.form(:index, 1).select_list[1].each do |option| puts option.inspect end Results in this output - but does not include the text in the option: option value=100Hello/option name: type: id: value: 100 disabled: false It would have though that the following would work: ff.form(:index, 1).select_list[1].each do |option| puts option.text #or puts option.inner_text end but - no love. any ideas would be very highly appreciated. Thanks a million. --~--~-~--~~~---~--~~ 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: Does Watir 1.6.2 install on Mac OS X?
Here's a thread to look at: http://groups.google.com/group/watir-general/browse_thread/thread/2870724cfa c1f1aa -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Moochie Sent: Sunday, April 26, 2009 4:19 PM To: Watir General Subject: [wtr-general] Re: Does Watir 1.6.2 install on Mac OS X? when I run this: sudo gem install safariwatir I get this? Building native extensions. This could take a while... ERROR: Error installing safariwatir: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb can't find header files for ruby. Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rb- appscript-0.5.1 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.1/ gem_make.out Any ideas? --~--~-~--~~~---~--~~ 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] show form select_list objects text
I have looked around and found no love on this subject. I would like to discover the text of a forms select list - is this at all possible? i.e ff.form(:index, 1).select_list[1].each do |option| puts option.inspect end Results in this output - but does not include the text in the option: option value=100Hello/option name: type: id: value:100 disabled: false It would have though that the following would work: ff.form(:index, 1).select_list[1].each do |option| puts option.text #or puts option.inner_text end but - no love. any ideas would be very highly appreciated. Thanks a million. --~--~-~--~~~---~--~~ 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: Test Results Report Methods
Can anyone send some sample code that creates reports using the html reporting class? Preferably a report with all of the bells and whistles that management would like to see. Thanks alot. - Shelton Date: Wed, 15 Apr 2009 15:47:22 -0700 Subject: [wtr-general] Re: Test Results Report Methods From: sqa...@gmail.com To: watir-general@googlegroups.com For performance data, it's hard to beat excel or a db, since that lets you create nice trending charts etc. Makes it really easy for upper management to see if things are getting better or worse, or when a sudden change occurs for better or worse. For pass/fail stuff here I was using the HTML reporting class that's in the examples (with a few tweaks to support a 'blocked' status) in the Watir Wiki. I've since largely switched over to using Watir with Watircraft + Cucumber, but have been heads-down on a lot of manual work and not had a lot of time for automation the last week or three. So I don't really have enough scenarios coded to generate a big enough report that I'd want to show to the bosses.. I'll be looking at whatever cucumber allows me to do reporting wise when the time comes, and/or incessently pestering brett to add some kind of pretty html reporting to the framework if what cucumber has isn't good enough for my needs. Good reporting becomes important from a visability standpoint IMHO, since automation often seems to more 'prevent' new bugs more than 'find' existing bugs (well other than when it's first written). So test reporting becomes important to demonstrate to your higherups that you are 'doing something' when they don't see you logging a lot of bugs. On Apr 15, 3:19 pm, Tiffany Fodor tcfo...@comcast.net wrote: Hi! I've been using ci_reporter to generate xml reports of my Test::Unit results (also works with RSpec) and then I use xsl to transform them to html. It's not the best and I'm working on better reporting in my next framework. I'll be using Rails, so I'll likely store results in MySQL and then make reporting pages in the Rails app. -Tiffany On Apr 15, 3:56 pm, Jason Shelton jas.shel...@hotmail.com wrote: All, I have always used Excel as my test output/results format, but I would like to enhance this. I have spoken with our DBA, and, if necessary he will create a table in our database for my test automation results. What I am asking is if you all can recommend any techniques and/or methodologies for reporting your test results. What worked for you? What looks nice? As I said, I have always used Excel, with the green or red cells(pass/fail), but I would like to take my test results to the next level. Thanks in advance for all of your help. - Shelton _ Internet Explorer 8 – Get your Hotmail Accelerated. Download free!http://clk.atdmt.com/MRT/go/141323790/direct/01/- Hide quoted text - - Show quoted text - _ Rediscover Hotmail®: Now available on your iPhone or BlackBerry http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile2_042009 --~--~-~--~~~---~--~~ 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] Test Results Report Methods
All, I have always used Excel as my test output/results format, but I would like to enhance this. I have spoken with our DBA, and, if necessary he will create a table in our database for my test automation results. What I am asking is if you all can recommend any techniques and/or methodologies for reporting your test results. What worked for you? What looks nice? As I said, I have always used Excel, with the green or red cells(pass/fail), but I would like to take my test results to the next level. Thanks in advance for all of your help. - Shelton _ Internet Explorer 8 – Get your Hotmail Accelerated. Download free! http://clk.atdmt.com/MRT/go/141323790/direct/01/ --~--~-~--~~~---~--~~ 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 do you find find frames.
I added this as a ticket - i hope i did it correctly. anyway - it is not brilliant, simply because now the root document is a different animal to the frames. I think is makes much more sence to address the root document as ff.frame(:index, 0) This results in a much more transparent logic for writing code - but means that the firewatir frame code needs to conditionaly deal with it - which is not very clean i.e. if :index == 0 then set_browser_document if might be better to cleanly distinguish more clearly between what firefox is - and what it returns. i.e. ff = Firefox.new #browser document = ff.goto(some_url) Then this would be possible and - i think more logical and transparent. #browser things can only do browser things i.e document = ff.back document = ff.forward document = ff.goto #document things and document things document.frame(:index, 1).links document.frame(:index, 2).links document.links or - but less obvious document.frame(:index, 0).links #root document document.frame(:index, 1).links document.frame(:index, 2).links On Apr 2, 11:20 pm, Charley Baker charley.ba...@gmail.com wrote: Can you also add this as a jira ticket with this patch? Charley Baker blog:http://blog.charleybaker.org/ Lead Developer, Watir,http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Thu, Apr 2, 2009 at 1:11 PM, jason jason.franklin.sto...@gmail.comwrote: I descided to add the method get_frames and refactor show_frames in the firefox.rb file as follows: now i can call get_frames and recieve the frames in an array with their attributes. BTW if you do this you wont be able to get back to the root document unless you also add the methods root to the firefox.rb file as well - see below. def root set_browser_document end def get_frames jssh_request_frames end def show_frames frames = jssh_request_frames puts There are #{frames.size} frames frames.each_index do |index| puts frame: name: #{frames[index].name} puts index: #{index+1} end end alias showFrames show_frames def jssh_request_frames jssh_command = var frameset = #{WINDOW_VAR}.frames; var elements_frames = new Array(); for(var i = 0; i frameset.length; i++) { var frames = frameset[i].frames; for(var j = 0; j frames.length; j++) { elements_frames.push(frames [j].frameElement); } } elements_frames.length; jssh_command.gsub!(\n, ) $jssh_socket.send(#{jssh_command};\n, 0) length = read_socket().to_i frames = Array.new(length) for i in 0..length - 1 do frames[i] = Frame.new(self, :jssh_name, elements_frames[# {i}]) end frames end On Apr 2, 5:32 pm, Paul Rogers paul.rog...@shaw.ca wrote: his doesnt answer your question, may be relevant;-) Some time back I was using firefox/firewatir to try and figure out if a page had frames, and if it did how many etc. It proved surprisingly difficult, I think because sometimes ( I cant remember what/how/why) firefox ( or firewatir ) would give me a chrome url, presumably this was something like frame 0 or the main browser. I dont remember if this ever got resolved to my satisfaction, or if I worked round it somehow. I would offer you my code, but firewatir has changed significantly since I did this, and probably wont help you Paul On Thu, Apr 2, 2009 at 9:25 AM, jason jason.franklin.sto...@gmail.com wrote: Thanks - I know this. The method is not helpful because it uses puts to output the frame information. The thing is - I don't need to see them - I want my program to automatically review them. i.e. getting links and buttons etc. On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote: You may try: ff.show_frames Thanks. Wesley Chen. On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.com wrote: I have looked and looked through the docs and I simply cannot find an answer to this. after calling doc = firefox.goto(some_url) I would like know what frames I have on the rendered page, i.e. frames = doc.frames #of cource this does not work, but I would expect an array of frame objects with their attributes returned. how do I do this? The only thing I found is doc.show_frames which is not exactly what I need. Thanks for any help on this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post
[wtr-general] ff.frame(:index,1).button(:index, 2) does not work?
has anyone an idea about this? is it me - or is this not supported in firewatir? ff.frame(:index,1).button(:index, 0).click #Unable to locate element, using :index, 0 (Watir::Exception::UnknownObjectException) --~--~-~--~~~---~--~~ 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: ff.frame(:index,1).button(:index, 2) does not work?
hmm tried that too, but to no avail. but at least it seems that it should work in principle. i will poke around and see what i can find. thanks On Apr 3, 8:02 pm, Charley Baker charley.ba...@gmail.com wrote: That's an interesting issue. Watir uses 1 based indexing, so it would be button(:index, 1) - the first button. -c On Fri, Apr 3, 2009 at 11:23 AM, jason jason.franklin.sto...@gmail.comwrote: has anyone an idea about this? is it me - or is this not supported in firewatir? ff.frame(:index,1).button(:index, 0).click #Unable to locate element, using :index, 0 (Watir::Exception::UnknownObjectException) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] How do you find find frames.
I have looked and looked through the docs and I simply cannot find an answer to this. after calling doc = firefox.goto(some_url) I would like know what frames I have on the rendered page, i.e. frames = doc.frames #of cource this does not work, but I would expect an array of frame objects with their attributes returned. how do I do this? The only thing I found is doc.show_frames which is not exactly what I need. Thanks for any help on this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] reflecting a frame looses the main document contents
So yet another strange thing, that I might be misunderstanding, After I query a frame for somthing, it like only this frame is relevant for any queries untill I address another frame. i.e. document = ff.got_to(some_url) document.links #great give me the links on the page document.frame(:index, 1).links#great gives me the links in the first frame document.links #OOPS now I get the links from the first frame again This is all fine - but I can't see how I get back to the main document contents. This does not work obvioulsy. document.frame(:index, 0).links This would be logical document.root.links So does anyone know how I address the main the document again? thanks - feedback appreciated. --~--~-~--~~~---~--~~ 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 do you find find frames.
Thanks - I know this. The method is not helpful because it uses puts to output the frame information. The thing is - I don't need to see them - I want my program to automatically review them. i.e. getting links and buttons etc. On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote: You may try: ff.show_frames Thanks. Wesley Chen. On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.comwrote: I have looked and looked through the docs and I simply cannot find an answer to this. after calling doc = firefox.goto(some_url) I would like know what frames I have on the rendered page, i.e. frames = doc.frames #of cource this does not work, but I would expect an array of frame objects with their attributes returned. how do I do this? The only thing I found is doc.show_frames which is not exactly what I need. Thanks for any help on this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: reflecting a frame looses the main document contents
just for documentations sake - here is the solution that I am now using. add the following to firefox.rb or better monkeypatch it. def root set_browser_document end now you can locate a frame and get it contents and then switch back to the main document with ff.root On Apr 2, 5:21 pm, jason jason.franklin.sto...@gmail.com wrote: So yet another strange thing, that I might be misunderstanding, After I query a frame for somthing, it like only this frame is relevant for any queries untill I address another frame. i.e. document = ff.got_to(some_url) document.links #great give me the links on the page document.frame(:index, 1).links #great gives me the links in the first frame document.links #OOPS now I get the links from the first frame again This is all fine - but I can't see how I get back to the main document contents. This does not work obvioulsy. document.frame(:index, 0).links This would be logical document.root.links So does anyone know how I address the main the document again? thanks - feedback appreciated. --~--~-~--~~~---~--~~ 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 do you find find frames.
I descided to add the method get_frames and refactor show_frames in the firefox.rb file as follows: now i can call get_frames and recieve the frames in an array with their attributes. BTW if you do this you wont be able to get back to the root document unless you also add the methods root to the firefox.rb file as well - see below. def root set_browser_document end def get_frames jssh_request_frames end def show_frames frames = jssh_request_frames puts There are #{frames.size} frames frames.each_index do |index| puts frame: name: #{frames[index].name} puts index: #{index+1} end end alias showFrames show_frames def jssh_request_frames jssh_command = var frameset = #{WINDOW_VAR}.frames; var elements_frames = new Array(); for(var i = 0; i frameset.length; i++) { var frames = frameset[i].frames; for(var j = 0; j frames.length; j++) { elements_frames.push(frames [j].frameElement); } } elements_frames.length; jssh_command.gsub!(\n, ) $jssh_socket.send(#{jssh_command};\n, 0) length = read_socket().to_i frames = Array.new(length) for i in 0..length - 1 do frames[i] = Frame.new(self, :jssh_name, elements_frames[# {i}]) end frames end On Apr 2, 5:32 pm, Paul Rogers paul.rog...@shaw.ca wrote: his doesnt answer your question, may be relevant;-) Some time back I was using firefox/firewatir to try and figure out if a page had frames, and if it did how many etc. It proved surprisingly difficult, I think because sometimes ( I cant remember what/how/why) firefox ( or firewatir ) would give me a chrome url, presumably this was something like frame 0 or the main browser. I dont remember if this ever got resolved to my satisfaction, or if I worked round it somehow. I would offer you my code, but firewatir has changed significantly since I did this, and probably wont help you Paul On Thu, Apr 2, 2009 at 9:25 AM, jason jason.franklin.sto...@gmail.comwrote: Thanks - I know this. The method is not helpful because it uses puts to output the frame information. The thing is - I don't need to see them - I want my program to automatically review them. i.e. getting links and buttons etc. On Apr 2, 5:19 pm, Wesley Chen cjq@gmail.com wrote: You may try: ff.show_frames Thanks. Wesley Chen. On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.com wrote: I have looked and looked through the docs and I simply cannot find an answer to this. after calling doc = firefox.goto(some_url) I would like know what frames I have on the rendered page, i.e. frames = doc.frames #of cource this does not work, but I would expect an array of frame objects with their attributes returned. how do I do this? The only thing I found is doc.show_frames which is not exactly what I need. Thanks for any help on this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Classes and Modules and Defs and understanding and referencing correctly
I've got a bunch of scripts that I load and include. Seems like the sensible thing to do: load 'global.rb' include Global load 'login.rb' include Login etc, etc. In the above login.rb, there's the following: def login(username, password) yada yada end However I'm also loading a *whole* lot of other scripts from a completely different watir library (for another application works alongside this application under test). Within this is another piece of code with another def with the same name as above: def login(username, password) yada yada different stuff end * Firstly, is there something completely wrong with doing this? Both Apps have their own Login screen which differ slightly, I think I'd like to keep the login script for each different. * When I run login({username}, {password}) it tends to pickup the incorrect Module and try to execute the *other* version of login(). Any way I can force which one it should use? * Anyone got any good links for understanding Classes / Modules / Def a little better. I think I'm failing to understand this completely. - Jason --~--~-~--~~~---~--~~ 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: Excel Issue?
Thanks for the response. Can you refer me to something else to print the results to, besides Excel? I would prefer something very similar to Excel. Thanks alot. - Shelton Date: Fri, 20 Mar 2009 09:41:06 -0700 Subject: [wtr-general] Re: Excel Issue? From: tcfo...@comcast.net To: watir-general@googlegroups.com Hi! I think Excel's row limit is 65536, if you're trying to write more rows than that, this could be your problem. If you really want to keep working with Excel, you could check to see if rows are available and if they're not, add a new tab or use new columns in the current tab. -Tiffany On Mar 20, 10:20 am, Jason Shelton jas.shel...@hotmail.com wrote: All, I have a routine in my program that compares files in two directories with the same name. For example, lets say I have 'Directory1' and 'Directory2'. The routine looks in each directory, and if a file name exists in both directories I compare the files. I then print the results of each comparison in an excel spreadsheet. Each comparison is put on its own row in the spreadsheet. This has been working fine, but now I have two directories with about 80,000 files each. I am getting this error when I run this against these directories: :in 'method_missing' : Range (WIN32OLERuntimeError) OLE error code:800A03EC in (Unknown) (No Description) HRESULT error code:0x80020009 Exception occurred. Is this an Excel size limitation issue? Thanks in advance for all help. - Shelton _ Get quick access to your favorite MSN content with Internet Explorer 8.http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=... _ Windows Live™ SkyDrive: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009 --~--~-~--~~~---~--~~ 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] Excel Issue?
All, I have a routine in my program that compares files in two directories with the same name. For example, lets say I have 'Directory1' and 'Directory2'. The routine looks in each directory, and if a file name exists in both directories I compare the files. I then print the results of each comparison in an excel spreadsheet. Each comparison is put on its own row in the spreadsheet. This has been working fine, but now I have two directories with about 80,000 files each. I am getting this error when I run this against these directories: :in 'method_missing' : Range (WIN32OLERuntimeError) OLE error code:800A03EC in (Unknown) (No Description) HRESULT error code:0x80020009 Exception occurred. Is this an Excel size limitation issue? Thanks in advance for all help. - Shelton _ Get quick access to your favorite MSN content with Internet Explorer 8. http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A --~--~-~--~~~---~--~~ 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: Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject...
In addition to what Darin has recommended, you might want to see what happens when you run the below commands through irb. (Like Darin, I was able to complete the below.) -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Darin Duphorn Sent: Wednesday, March 18, 2009 8:37 PM To: watir-general@googlegroups.com Subject: [wtr-general] Re: Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject... Does it open the web page correctly? Or does it fail right off the bat? Check the following. Goto Setting -Control Panel- System Click Advanced Tab Click Environment Variables Under Path Variable verify c:\Ruby\bin Exists. If not add it. Under PATHEXT Variable verify .RB exists. If not add it If variable RUBYOPT Doesn't Exist add it RUBYOPT - Value = -rubygems -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of vladimir...@hotmail.com Sent: Wednesday, March 18, 2009 8:26 PM To: Watir General Subject: [wtr-general] Re: Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject... Thank you, Darin for reply. Ruby version: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] Gem list: *** LOCAL GEMS *** activesupport (2.3.2) builder (2.1.2) commonwatir (1.6.2) firewatir (1.6.2) fxri (0.3.6) fxruby (1.6.12) hoe (1.11.0) hpricot (0.6) log4r (1.0.5) rake (0.8.4, 0.7.3) rubyforge (1.0.3) rubygems-update (1.3.1) s4t-utils (1.0.4) sources (0.0.1) user-choices (1.1.6) watir (1.6.2) win32-api (1.4.0, 1.0.4) win32-clipboard (0.4.3) win32-dir (0.3.2) win32-eventlog (0.4.6) win32-file (0.5.4) win32-file-stat (1.2.7) win32-process (0.6.0, 0.5.3) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.3.0, 0.2.0) windows-pr (1.0.2, 0.7.2) xml-simple (1.0.12) On Mar 18, 6:02 pm, Darin Duphorn dduph...@redbrickhealth.com wrote: I ran your code and it worked for me. What Version of ruby did you load? Type in command prompt ruby -v What gems do you have installed? gem list -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of vladimir...@hotmail.com Sent: Wednesday, March 18, 2009 6:42 PM To: Watir General Subject: [wtr-general] Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject... I was trying to run google_search.rb from tutorial: require 'watir' # set a variable test_site = http://www.google.com; # open the IE browser ie = Watir::IE.new ie.goto test_site ie.text_field(:name, q).set pickaxe # q is the name of the search field Always getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObjectException...) Spent already half a day. Nothing works. Please, help. Thank you very much, Vladimir- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to send a mail from outlook express using watir
The initial question that occurred to me is why you are trying to automate the sending of an email with Outlook Express. Why not leverage Ruby to send the email without the additional complexity of trying to figure out how deal with Outlook Express. Bringing Outlook Express into the equation just seems painful to me. Beyond that, to address your original question, it might help to break down the problem into manageable parts. First, create a script to send a simple email.then, start worrying adding the complexity of sending content from a log file. Jason From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of prasoona alluri Sent: Thursday, March 05, 2009 5:35 AM To: watir-general@googlegroups.com Subject: [wtr-general] Re: How to send a mail from outlook express using watir Thank for the reply. But i am facing the following error `initialize': unknown OLE server: `Outlook.Application' (WIN32OLERuntimeError) for the following statement require 'win32ole' outlook = WIN32OLE.new('Outlook.Application') Thanks On Thu, Mar 5, 2009 at 5:12 AM, Walter Kruse ou_ryp...@hotmail.com wrote: This is for Outlook, but maybe it can help: http://rubyonwindows.blogspot.com/search/label/outlook _ Date: Thu, 5 Mar 2009 04:40:02 -0600 Subject: [wtr-general] How to send a mail from outlook express using watir From: pallu...@gmail.com To: watir-general@googlegroups.com Hello, Please help me to delvelop a script for sending a mail from outlook express using watir. The message text should be read from a log file . Thanks in advance. -Prasoona _ See all the ways you can stay connected to friends and family http://www.microsoft.com/windows/windowslive/default.aspx br --~--~-~--~~~---~--~~ 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: Array Elements
Thanks. Will this work for a part of an element? For example, lets say that I have 5 lines of characters in my array: arr[0] = '12345' arr[1] = '445566' arr[2] = '4545543455' arr[3] = '45367445' arr[4] = '787873486895' I want to look at each line, and determine which lines contains a certain string, and put those lines in a separate array. So say for instance that I am looking for each line that has a '34' in it. In this case, arr[0], arr[2], and arr[4] should be put into the second array. How do I look for a part of an array element? The code that you provided looks like it is looking at the element as a whole. Thanks in advance for all of your help. - Shelton Date: Mon, 23 Feb 2009 14:13:54 -0800 Subject: [wtr-general] Re: Array Elements From: myrav...@gmail.com To: watir-general@googlegroups.com second_array=[] ; first_array.each{|a| second_array a if a =~ / expected_text/} On Feb 23, 3:53 pm, Jason Shelton jas.shel...@hotmail.com wrote: All, I am reading an xml file into an array of lines(arr[]). I want to look at each individual line (element) of the array, and determine if the element contains a certain block of text. Is there a contains_text method, or something similiar, for array elements? I want to find all elements in the array that contain a certain block of text, and then make another array that is made of those array elements. Can anyone provide some help with this? Thanks in advance. - Shelton _ Windows Live™ Hotmail®:…more than just e-mail.http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_... _ Windows Live™: Discover 10 secrets about the new Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!7540.entry?ocid=TXT_TAGLM_WL_t2_ugc_post_022009 --~--~-~--~~~---~--~~ 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: Hiding the browser
Is there a way to hide popups too? Your recommendation worked, but when a popup is prompted, the browser is no longer hidden. Thanks in advance. - Shelton Date: Sat, 21 Feb 2009 12:39:10 +0800 Subject: [wtr-general] Re: Hiding the browser From: cjq@gmail.com To: watir-general@googlegroups.com Add $HIDE_IE=true before your IE process has been created.Thanks. Wesley Chen. On Sat, Feb 21, 2009 at 1:59 AM, Jason Shelton jas.shel...@hotmail.com wrote: All, Is there a new way of hiding the browser with Watir? It seems that ie.visible = false no longer works. Thanks alot. - Shelton Windows Live™: E-mail. Chat. Share. Get more ways to connect. Check it out. _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_022009 --~--~-~--~~~---~--~~ 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] Array Elements
All, I am reading an xml file into an array of lines(arr[]). I want to look at each individual line (element) of the array, and determine if the element contains a certain block of text. Is there a contains_text method, or something similiar, for array elements? I want to find all elements in the array that contain a certain block of text, and then make another array that is made of those array elements. Can anyone provide some help with this? Thanks in advance. - Shelton _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_022009 --~--~-~--~~~---~--~~ 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] Select Lists
All, I have a control in my application, that looks a list box, but in the code it is treated as a select list. When I use the Watir select list commands, everything works fine. My problem is that when I first bring up the page that contains the list, one item in the list is already highlighted (by default). If I use the 'set' method for select lists to select another item in the list, the item I want selected is selected, but the default item is still selected. I need a way of selecting the item I want selected, and unselecting the default item. Is this possible? I can elaborate if necessary. Thanks in advance. - Shelton _ Windows Live™: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_022009 --~--~-~--~~~---~--~~ 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] Hiding the browser
All, Is there a new way of hiding the browser with Watir? It seems that ie.visible = false no longer works. Thanks alot. - Shelton _ Windows Live™: E-mail. Chat. Share. Get more ways to connect. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---