[wtr-general] Re: gem update --system is disabled on Debian
On Wed, Nov 04, 2009 at 11:00:08PM -0800, Marlon wrote: Hi, I'm getting this error: While executing gem ... (RuntimeError) gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get. when doing system update/running sudo gem update --system on ubuntu 9.10 Please help. Have you tried upgrading through apt-get like the error message tells you to do? - 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] Re: New to Watir Scripting
On Fri, Oct 30, 2009 at 02:18:58AM -0700, Anuradha wrote: How to pass data from Open office org sheet to a application..Need clear information about the data driven Please read: * http://wiki.openqa.org/display/WTR/Support * http://tinyurl.com/6x7j35 --~--~-~--~~~---~--~~ 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: Script on select list item, clickon btn1 and Logoutfunction()
On Mon, Oct 05, 2009 at 05:46:10PM +0530, venkat wrote: Hi, I got the following error and my script fails to identify the list item, can't click the Select button and Logout too fails. Can anyone please help me. HTTP Status 500 - This is a problem with the application you're testing, not a problem with Watir. Read this for more information: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - 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] Re: I'm looking for a way to count all PageTo(*) elements or to loop until the bullet_search_white_small.gif doesn't exist in the page
On Thu, Sep 17, 2009 at 09:22:19AM -0700, Guy wrote: 1). How can I get the text out of em tag for each div? that tag seems as not supported. The latest git version supports em: http://github.com/bret/watir/commit/1a8e3368b7e7ce790f8a596a7d8bcefe0f937407 http://github.com/bret/watir/commit/52557ea6936f847c4ee0578608fd036258856c29 Unfortunately, to get this, you'll have to build Watir yourself (http://wiki.openqa.org/display/WTR/Building+Watir) or port the above commits into your sources. There is also the quick and dirty way, courtesy of String#scan: ie.div(:id, 'resultsList').lis.each do |element| puts element.link(:url, /job/).text.scan(/em(.*)\/em/) end The xpath works great but for the em tag only - ie.element_by_xpath (//em).innerText div id=resultsList class=ol id=searchResultsListlispan class=jobsearchNumber1input type=checkbox name=chkJob onClick=UpdateSelectedItems(); value=16015024/input/ spandivh2a href=/job/file-migration-b-analyst-b/gold-coast/ 16015024/File Migration span class=highlightAnalyst/span/a emTLC ITStaff/em/h2 2). Is there a generic method/procedure to iterate for all results page/s? You have to write your own based on the structure of the site/page. You can use the exists? method to check for the presence of an element: ie.link(:text, 'Next').exists? This won't give you an error even if there's no Next link on the page. By the way, Watir offers many selection methods so you may want to check out this page: http://wiki.openqa.org/display/WTR/Methods+Supported+by+Element XPath is really overkill for many cases. - Anna Follows the html: span class=framespan class=frameStarti/i/span div class=contentBox firstBox h1span id=ContentInclude_YourQuery1_ResultsLabelstrong1/strong - strong2/strong of strong2/strong /spanspanjobs containing strongtest analyst/strong in strongGold Coast/strong/span or check if the 'Next' exists (how can I handle a scenario with no 'Next' (just one page with or no results at all): ie.element_by_xpath(//strong[contains(text(),'Next')]).click (this works but how can I handle just one page or no results at all) div class='searchPagination'dl class='jobSearchPagination' a class='nextPage btn pinkbtn_small' href=javascript: PageTo (2)strongNextimg src='/general_ID_items/images/other/ bullet_search_white_small.gif'/strong/adtPage/dtdd class='currentPage'span1/span/dd dda href=javascript: PageTo(2)2/a/dd dda href=javascript: PageTo(3)3/a/dd dda href=javascript: PageTo(4)4/a/dd dda href=javascript: PageTo(5)5/a/dd dda href=javascript: PageTo(6)6/a/dd dda href=javascript: PageTo(7)7/a/dd dda href=javascript: PageTo(8)8/a/dd dda href=javascript: PageTo(9)9/a/dd dda href=javascript: PageTo(10)10/a/dd/dl/div /div Thank U all for the helpful support Guy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Not able to run CMS installer if object is already attached to its url
On Wed, Sep 16, 2009 at 03:34:05AM -0700, Arpita Jain wrote: Hi all, I created a watir object and attached it to my CMS's url. Then I run the CMS installer, it worked fine in the starting but while refreshing environment it hanged. To make installer moving ahead I have to stop the process FYI: Installer is created using InstallAnywhere. Did someone faced the same problem? Thank in advance Hi Arpita, This is not enough information to understand your problem. Please, show your source code and give more details of the CMS and installer you're using. Reading this page might also help: http://wiki.openqa.org/display/WTR/Support - 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] Re: I'm looking for a way to count all PageTo(*) elements or to loop until the bullet_search_white_small.gif doesn't exist in the page
On Wed, Sep 16, 2009 at 09:04:31AM -0700, Guy wrote: to all watir wiz, Would love to get support: puts ie.div(:id, resultsList).text could be used to get a long (correct) list all the right divs. I would like to get the the values (Test Analyst Load Runner', 'Fri 11 Sep', 'Excellent 12 Month fixed Term role for a Test Analyst with strong Load Runner Experience - One of the largest testing teams in Brisbane is expanding' and 'Hudson') as separated using: puts ie.span(:class, jobSearchJobListedDate).text puts ie.span(:class, highlight).text puts ie.element_by_xpath(//em).innerText and write them into csv file. I can I create a divs collection and run the above on each div? I also tried the next: ie.elements_by_xpath(//d...@id='resultsList']).each do |elem| Is there a way to run elem.span(:class, highlight).text or am I wrong? Cheers, Guy XPath is overkill. Your sample HTML has an ordered list of results, so why not iterate through it? ie.div(:id, 'resultsList').lis.each do |element| puts element.span(:class, 'highlight').text end Note how these selectors can be chained. ie.div(:id, 'resultsList').lis will return only li elements inside the named div, then element.span(:class, 'highlight') will return the matching span within one particular li. For more details, refer to Watir API documentation (http://wtr.rubyforge.org/rdoc/). I'll let you fill in the rest. HTH, Anna but I would like to get On Sep 14, 11:29 pm, Guy guy.kid...@gmail.com wrote: Hello All, Thanks for the help so far. I still face a problem to retrieve the next info ('Test Analyst Load Runner', 'Fri 11 Sep', 'Excellent 12 Month fixed Term role for a Test Analyst with strong Load Runner Experience - One of the largest testing teams in Brisbane is expanding' and 'Hudson') from the next html: I would like to create a list of all jobs from a given page (there are ~20 links per page) so this is just example values. div id=resultsList class=ol id=searchResultsListlispan class=jobsearchNumber1input type=checkbox name=chkJob onClick=UpdateSelectedItems(); value=15998998/input/ spandivh2a href=/job/b-test-b-b-analyst-b-load-runner/brisbane/ 15998998/span class=highlightTest Analyst/span Load Runner/ a emHudson/em/h2span class=jobSearchJobListedDateFri 11 Sep/spandivpExcellent 12 Month fixed Term role for a Test Analyst with strong Load Runner Experience - One of the largest testing teams in Brisbane is expanding./pspan class=taxonomya href=javascript:ClassTree ('catindustry=1215')I.T. amp; T/a gt; a href=javascript:ClassTree ('catoccupation=1491amp;catindustry=1215')QA/Testers/a/span/ divh3Brisbane/h3h3/h3/div/lilispan class=jobsearchNumber2input type=checkbox name=chkJob onClick=UpdateSelectedItems(); value=15995612/input/ spandivh2a href=/job/b-test-b-b-analyst-b/brisbane/ 15995612/span class=highlightTest Analyst/span/a emBeyond Recruitment Pty Ltd/em/ h2span class=jobSearchJobListedDateFri 11 Sep/spandivpTest Analyst contract opportunity at a leading company based in Brisbane CBD/pspan class=taxonomya href=javascript:ClassTree ('catindustry=1215')I.T. amp; T/a gt; a href=javascript:ClassTree ('catoccupation=1491amp;catindustry=1215')QA/Testers/a/span/ divh3Brisbane/h3h3/h3/div/lilispan class=jobsearchNumber3input type=checkbox name=chkJob onClick=UpdateSelectedItems(); value=15956235/input/ spandivh2a href=/job/peoplesoft-b-test-b-b-analyst-b/brisbane/ 15956235/PEOPLESOFT span class=highlightTEST ANALYST/span/a emIntegrated Business Technologies Pty Ltd/em/h2span class=jobSearchJobListedDateFri 04 Sep/ spandivpImmediate requirement for an experienced PeopleSoft test analyst across HR/Payroll/pspan class=taxonomya href=javascript:ClassTree('catindustry=1215')I.T. amp; T/a gt; a href=javascript:ClassTree ('catoccupation=1491amp;catindustry=1215')QA/Testers/a/span/ divh3Brisbane/h3h3/h3/div/lilispan Cheers, Guy On Sep 11, 6:14 pm, Wesley Chen cjq@gmail.com wrote: For the comment below: $ie.element_by_xpath(//img[contains(@src, 'report_delete.png')]).click It can locate an image element, which has src attributes, for the report_delete.png is just part of the src. I think it can help you. Thanks. Wesley Chen. On Fri, Sep 11, 2009 at 6:03 PM, Guy guy.kid...@gmail.com wrote: Hello Orde, It sure works but I should have ask my question better. The peoplesoft-b-test-b-b- analyst-b/brisbane can't be hard coded into the xpath as it changes. is there a way to use regexpr in the xpath? I think that /job/ is always returns. Cheers, Guy On Sep 11, 9:26 am, orde ohil...@gmail.com wrote: You should take a look athttp://wiki.openqa.org/display/WTR/XPath. Something like this should work: puts
[wtr-general] Re: graph/charts
On Aug 4, 12:38 pm, anna barbara ostrowska ab.ostrow...@gmail.com wrote: Hi there, Can you recommend me any tool/ruby library that allows me convert data (metrics) to graph/charts ect? Take a look at Gruff: http://nubyonrails.com/pages/gruff --~--~-~--~~~---~--~~ 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: require function is not working
On Sat, Jun 13, 2009 at 05:50:19AM -0700, Chethan wrote: I am using require earlier, I even make sure that when I call the file present working directory is same, as I said earlier I was using this type of frame work earlier it was working absolutely well. I tried many a times, more over I am not getting any error after it run. Thanks, Chethan Hi Chethan, As others have said, require is part of Ruby. Require is not part of Watir. Its behavior can be influenced by environment variables and other settings. It's hard to help you if you don't don't provide any details, since we don't have enough information to figure out where the problem is. Anyway, if Wesley's suggestion didn't work for you, please provide the following: * Exact description of your problem: your code, what you expected to happen, and what is actually happening * Exact text of error messages or other output that you see - 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] Re: how to install watirloo
On Sun, Jun 14, 2009 at 01:10:56PM +0800, 王博天 wrote: HI: I want to install watirloo, when i using gem install to install it ,there is a error ,like below C:\watirloogem install watirloo ERROR: could not find gem watirloo locally or in a repository please help me how to install watirloo,is there any other method to do so. Watirloo is in GitHub, so you can try this: 1. gem sources -a http://gems.github.com/ 2. gem install marekj-watirloo HTH, 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] Re: how do i check ads/images present on the web page and loading fine
Hi Yogesh, Try reading: http://wiki.openqa.org/display/WTR/Support On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote: I need to check all the ads/images present on the webpage.They all are coming from different locations,need to verify ,all images are loading fine,no 404/302 error, also need to check the magic no is coming correctly for that image. you can use http://fanhouse.com as a input url. Thanks, Yogesh Use the link below to report this message as spam. https://lavabit.com/apps/teacher?sig=561613key=3600820026 --~--~-~--~~~---~--~~ 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: Can I get the content in the boolean left and right value??
On Wed, Apr 08, 2009 at 01:10:57PM +0800, Wesley Chen wrote: Hi, All, Suppose I would like to write a method like. def test(boolean, message) if boolean puts message else puts boolean.left_value puts boolean.right_value end end Sometimes, I have to invoke the methods like: test(arra.include?(arrb), arra includes arrb) test(arra.eql?(arrb), arra equals to arrb) When the boolean is not true, I would like to get the info why they don't match/equal/include. It's not possible within the method you defined since it only receives the boolean value. You'll have to pass in arra and arrb if you want to get at them within the method. You can look at the different Test::Unit::Assertions for inspiration: http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html In particular: * assert_equal(arra, arrb, message goes here) * assert_operator(arra, :include?, arrb, message goes here) HTH, 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] Re: Flash with watir
Also, keep in mind that FlashWatir is not a universal solution to testing Flash. It can only see the functions that the Flash app chooses to expose to JavaScript. So testing a random app on the web isn't likely to work; testing an in-house app will require talking to your developers about exposing the needed functions. See this link for more info: http://code.google.com/p/flash-watir/wiki/ExternalInterface - Anna In other words, you'll need cooperation from the On Mon, Apr 06, 2009 at 01:41:57PM -0700, Chuck van der Linden wrote: For FlashWatir support, you'd probably be best off contacting the developer of flashwatir directly since I don't see that they have a forum or anything listed on the google code page for it. Your example below appears to be just a slightly edited version of their generic example code, Most likely the flash element that you are trying to access has an ID other than 'clickcolors' which is why it's not found. If you dont' understand how identifying page elements and such works, I'd strongly recommend you work through the watir tutorial (http:// wiki.openqa.org/display/WTR/Tutorial). Without a basic understanding of what's going on, you won't know what things need to change (like how objects on the page are identified) in order to experience anything but failure when you try to utilize sample code in the way you are. On Apr 6, 11:14 am, kiran gki...@gmail.com wrote: Hi all, Is it posible to test flash on the web? I am using following code # include the controller require 'flash_watir' include FireWatir # create an instance of the controller browser = Firefox.new # go to the flash page you want to test browser.goto('http://www.geocities.com/paulocaroli/flash/colors.html') sleep(3) # call the default methods available in flash percentage_loaded = browser.flash(:id, clickcolors).percent_loaded but i am getting the below erroe.ruby flash.rb C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/ flash.rb:20:in `percent_loaded': Unable to locate element, using :id, clickcolors (Watir::Exception::UnknownObjectException) from flash.rb:10 Exit code: 1- Hide quoted text - - Show quoted text - Use the link below to report this message as spam. https://lavabit.com/apps/teacher?sig=539281key=2513201441 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: IE instance problem
P.S. Starting your variable names with $ turns them into global variables. Avoid doing so unless you really need it. - 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] Re: IE instance problem
On Tue, Mar 31, 2009 at 11:33:42PM -0700, Vikas Tulashyam wrote: Hi Anna, Is there any method by which I can convert the String values to Hash. Thanks Vikas Well, the fastest (but also dirtiest) way is instance_eval: irb(main):001:0 s = {:name='q'} = {:name='q'} irb(main):002:0 s.class = String irb(main):003:0 o = instance_eval(s) = {:name=q} irb(main):004:0 o.class = Hash This would work, but I wouldn't recommend it since it interprets everything in Locator as Ruby code. You could also add more structure to the locator and build the hash yourself: Locator Keyname/Key Valueq/Value Locator def get_object_locator(object_id) object_file = Document.new File.new('c:\a.xml') object_file.elements.each(//TestObject[Identifier='#{object_id}']) { locator = element.elements['Locator'] key = locator.elements['Key'].text value = locator.elements['Value'].text return { key.to_sym, value } } end That's not the most elegant of code, but you get the idea. HTH, Anna On Apr 1, 11:06 am, Anna Gabutero a...@lavabit.com wrote: On Tue, Mar 31, 2009 at 09:07:29PM -0700, Vikas Tulashyam wrote: Hi firends, Please help me. Thanks Vikas On Mar 31, 6:24 pm, Vikas Tulashyam vtulash...@gmail.com wrote: Hi, Actually, I am trying to read the sLocator value form a xml file and thats the main problem if I put the value directly into a variable then it's working fine like-- a= {:name='q'} return $sBrowser.text_field(a) Code written above works fine but when I m doing this- sLoc = getObjectLocator(Text_Search) return $sBrowser.text_field(sLoc) def getObjectLocator(sObjectId) begin $sObjectFile = Document.new File.new(c:\\a.xml) $sObjectFile.elements.each(//TestObject[Identifier='# {sObjectId}']) { |element| sLocator = element.elements['Locator'].text sObjectType = element.elements['ObjType'].text return sLocator } sLoc returns the correct value, I tried this by printing the sLoc value but It is nt working It is returning a different value. Your assignment is equivalent to: sLoc = {:name='q'} which is different from: a = {:name='q'} The first is a string, the second is a hash, and these object types are not interchangeable. - Anna Use the link below to report this message as spam. https://lavabit.com/apps/teacher?sig=533695key=3598775855 --~--~-~--~~~---~--~~ 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 automate site with Captcha?
Margam, it's possible if you have server-side access to the web application. Then you can peek at where the app stores the captcha code (since it has to be stored somewhere so the app can compare with the value you entered) and provide that value to the form. Captcha implementations vary, so you'll have to work out the details after reading the web app's code. Otherwise, you're out of luck since the whole point of a captcha is to confound automation. - Anna On Sat, Mar 07, 2009 at 02:17:17PM -0700, Charley Baker wrote: That's awesome, an automated way to handle the captcha. You're kidding right? Or this is the best post ever. -c On Sat, Mar 7, 2009 at 1:33 PM, Margam nk.mar...@gmail.com wrote: Hello everyone, For my current client's web site testing requirement, I need to handle a page that has a Captcha. I tried searching the group for any similar treads, but could not. Can anyone help with steps to handle the Captcha? Like getting the text in the captcha image. Thank you very much. Margam Use the link below to report this message as spam. https://lavabit.com/apps/teacher?sig=509011key=267957524 --~--~-~--~~~---~--~~ 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: Pulling hair out on screen scraping
Hi Michael, On Sat, Jan 03, 2009 at 10:31:38AM -0800, Bissquitt wrote: Regarding documentation, I read the Tutorial all the way through but it only hit on a few specific examples leaving out other commands all together. I've visited MANY ruby and watir sites and never once saw the .span command (does it just search for span tags? guess ill google it after this post) I never even found a site listing all the watir commands ( http://us.php.net/manual/en/function.abs.php ) as an example. This is in the Watir wiki, which seems to be down at the moment, so here's an alternative link: http://tinyurl.com/watirmethods In addition there are SO MANY tutorials and such online that are all very poorly done it makes finding a good one via google a needle in a haystack scenario. ie (oh great, you showed me that specific command, but showed me nothing about how that command works so unless I want to use it exactly the way you used it, its useless). I wouldn't go so far as to call the tutorials poorly done but most Watir tutorials do seem to be written with non-programmers in mind. That said, Ruby is a full-fledged language, much like Java and C++ are, so it would be out of scope for a Watir tutorial or Excel automation tutorial to teach you language basics too. However, if you installed Ruby using the one-click installer, you already have most of the documentation you need in your computer. To see the APIs, you can use either fxri (a graphical interface to the language documentation) or the rubygems rdoc server (a daemon that you can access as http://localhost:8808/ through your browser). I can't give the exact location since I don't have access to a Windows computer right now, but all of these are somewhere in the Ruby folder in the Start Menu. A copy of the Pickaxe book mentioned earlier should be in there too. What on earth does .succ! do? It never tells me. The site, and most that ive seen, are written not to target new people and tutor them but to target advanced users with a more so heres a cool way to approach the problem approach. A simple ok, here is the the excel class, here are the comands in it and what they do, here is a syntax example would be far more helpful as it doesn't leave anything out. I'm still not sure if its possible to return what row the active cell is on. Ruby interacts with Excel using an OLE automation object, which is more of a Microsoft thing than a Ruby thing. It is documented here: http://msdn.microsoft.com/en-us/library/aa272268(office.11).aspx I don't quite follow your first example since I am barely familiar with ruby syntax (though it appears to be similar to java) what is the |s| ? This is part of block syntax. Look it up in the Pickaxe inside the chapter called Containers, Blocks, and Iterators. I'm guessing span just looks for span tags? Yes. I'm also guessing that (:id, /ctl/) looks for any span tag with an id matching /ctl/ ? (this is where im not following you as much) Yes. what does the : in your example do? It references the id symbol. Without going into too much detail, span(:id, /ctl/) is more efficient than span('id', /ctl/) due to the way Ruby allocates memory for strings. Don't worry too much about this, just use it (and don't mix up symbols and strings). what exactly is the second argument doing, what are the slashes? The slashes denote a regular expression, which means that it will match any span whose id attribute contains 'ctl'. You can compare this to span(:id, 'ctl'), which will match only the span whose id attribute is exactly equal to 'ctl'. and what does the .text at the end do? It's a method call that returns the text inside the span tag. Sorry for being rather dense but I have barely delt with web programming before. I've spent my life doing C++, Java, and BASIC so I'm pretty much trying to stumble into a final product as gracefully as I can. Don't overthink it. With Ruby, you're still dealing with objects, classes and methods, so your experience with OOP concepts should help you. HTH, 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] Re: figured it out Re: stupid install problem
On Fri, Dec 26, 2008 at 02:43:39PM -0700, Lisa Crispin wrote: I had to add RUBYOPT -rubygems to my environment variables - I have NO memory of ever doing that before, did Watir or Ruby change, or are my brain cells just dying off faster than usual? Sigh. The one-click installer should have set RUBYOPT. Not sure why it didn't, unless they changed it very recently. - 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] Re: Framework
On Fri, Dec 26, 2008 at 10:19:29AM -0800, watirpuppy wrote: I think the core framework(s) are: test-unit rspec both gems to install in your ruby environment. Test::Unit is a standard ruby library. There's no need to install it as a gem. - 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] Re: Please guide about watir-Ruby
On Mon, Dec 08, 2008 at 01:55:22AM -0800, Parul wrote: Hi, I’m a new user of Watir-Ruby. I’ve installed it on my machine n while executing I’m getting an error. ruby e1.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- watir (LoadError) This error means that you don't have Watir installed correctly. Open up a command prompt and type gem install watir. If it still doesn't work, please post the contents of your e1.rb script. - 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: RubyGem version error | Builder error.
The rdoc generation error doesn't really matter. It looks like you need to update hoe too (gem update hoe). High Bits Perf Tester wrote: When running through the tutorial Im getting this error: C:/Apps/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `report_activate_error': RubyGem version error: hoe(1.7.0 not = 1.8.1) (Gem::LoadError) I saw an eariler post say that this was needed to be done: just needed to do: gem install builder When I try installing the gem I get the following error And I still get the error above. (Any idea's?) C:\Apps\Rubygem install builder Successfully installed builder-2.1.2 1 gem installed Installing ri documentation for builder-2.1.2... ERROR: While generating documentation for builder- ... MESSAGE: Unhandled special: Special: type=17, ... RDOC args: --ri --op C:/Apps/Ruby/lib/ruby/gems itle Builder -- Easy XML Building --main README --l ES Rakefile README doc/releases/builder-1.2.4.rdoc oc doc/releases/builder-2.1.1.rdoc (continuing with the rest of the installation) Installing RDoc documentation for builder-2.1.2... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---