Re: [wtr-general] Re: Isn't .exists? a boolean method?

2012-12-14 Thread Abe Heward
Thanks! On Thursday, December 13, 2012 2:37:50 PM UTC-7, Željko Filipin wrote: On Thu, Dec 13, 2012 at 9:09 PM, Željko Filipin zeljko@gmail.comjavascript: wrote: I just fixed a similar problem myself. Reverting back to Firefox 16 fixed the problem. And here it is:

[wtr-general] Re: Isn't .exists? a boolean method?

2012-12-13 Thread Abe Heward
On Wednesday, December 12, 2012 12:15:56 PM UTC-5, Abe Heward wrote: Note that I am using Watir-webdriver 0.6.2 On Wednesday, December 12, 2012 10:12:28 AM UTC-7, Abe Heward wrote: I appear to be misunderstanding something fundamental... Assume my page does not contain a span with a class

[wtr-general] Re: Isn't .exists? a boolean method?

2012-12-13 Thread Abe Heward
Sadly, an upgrade to the latest selenium-webdriver (2.27.2) hasn't resolved this problem. :( On Thursday, December 13, 2012 6:47:57 AM UTC-7, Abe Heward wrote: Thanks, Justin, I'll give that a try. On Wednesday, December 12, 2012 3:38:58 PM UTC-7, Justin Ko wrote: Are you using Firefox? I

Re: [wtr-general] Re: Isn't .exists? a boolean method?

2012-12-13 Thread Abe Heward
, Abe Heward ahe...@rsmart.comjavascript: wrote: Sadly, an upgrade to the latest selenium-webdriver (2.27.2) hasn't resolved this problem. :( Could you provide a minimal HTML and Ruby code to reproduce the problem? Or even better, link to the page with the problem? Or, do you get timeout

Re: [wtr-general] Re: Isn't .exists? a boolean method?

2012-12-13 Thread Abe Heward
and expect it to fail On Thu, Dec 13, 2012 at 2:48 PM, Abe Heward ahe...@rsmart.comjavascript: wrote: That'll be tough, unfortunately. The basic issue, though, is: 1) Target element (in my case it was a span being identified by its class) does not exist on the page 2) Use

[wtr-general] Isn't .exists? a boolean method?

2012-12-12 Thread Abe Heward
I appear to be misunderstanding something fundamental... Assume my page does not contain a span with a class of welcome... Given that, if I have this line in my Watir code: @browser.span(class: welcome).exist? ...should that not immediately return a *false*? Why would this ever return a

[wtr-general] Re: Looong pauses while calling present?, exists?, etc... - why do you think this happens?

2012-12-12 Thread Abe Heward
HA! That's funny that I just posted about this EXACT problem. .present? and .exists? should just immediately return true or false--to my mind, anyway. Timeout errors are just inappropriate here. On Monday, December 10, 2012 10:28:15 PM UTC-7, Nigel wrote: We're successfully finding elements

[wtr-general] Re: Isn't .exists? a boolean method?

2012-12-12 Thread Abe Heward
Note that I am using Watir-webdriver 0.6.2 On Wednesday, December 12, 2012 10:12:28 AM UTC-7, Abe Heward wrote: I appear to be misunderstanding something fundamental... Assume my page does not contain a span with a class of welcome... Given that, if I have this line in my Watir code

[wtr-general] NS_ERROR_FAILURE -- the new Stale Reference Element error?

2012-09-19 Thread Abe Heward
Suddenly this week I've been seeing a lot of this error, in Watirwebdriver scripts that worked just fine last week: Selenium::WebDriver::Error::UnknownError: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [xpcIJSWeakReference.get] This is in Firefox, which I believe I just

[wtr-general] Re: NS_ERROR_FAILURE -- the new Stale Reference Element error?

2012-09-19 Thread Abe Heward
Ah! It looks like it happens any time there are field changes on the page--like hidden fields becoming visible, and suchlike. That's really really annoying! On Wednesday, September 19, 2012 10:38:51 AM UTC-7, Abe Heward wrote: Suddenly this week I've been seeing a lot of this error

[wtr-general] Can Watir handle HTML attributes that contain dashes?

2012-08-09 Thread Abe Heward
If I want to monkey patch Watir to recognize custom HTML attributes (custom_attrib in the example code) I just add this code: module Watir class Element def custom_attrib @how = :ole_object return @o.custom_attrib end end end However, take a look at the custom

[wtr-general] Re: Drag_and_drop_on question...

2012-07-03 Thread Abe Heward
Ah! I can see the drag-and-drop happening, so it looks like I just need to figure out exactly what element I need to drop it onto. On Monday, July 2, 2012 2:43:57 PM UTC-7, Abe Heward wrote: I have this element on a page: a title=Insert text block data-element-type=htmlblock class

[wtr-general] Re: Selenium::WebDriver::Error::UnknownError with chromedriver and watir-webdriver 0.6.1

2012-07-02 Thread Abe Heward
Nope. Sorry. On Friday, June 29, 2012 5:40:02 PM UTC-7, Oscar.Rieken wrote: has anyone come across this using the newer version of chromedriver and watir-webdriver 0.6.1 selenium 2.24.0 browser.labels.first Selenium::WebDriver::Error::UnknownError: findElements returned invalid value:

[wtr-general] Drag_and_drop_on question...

2012-07-02 Thread Abe Heward
I have this element on a page: a title=Insert text block data-element-type=htmlblock class=inserterbar_widget_draggable inserterbar_text_widget inserterbar_standard_icon ui-draggable tabindex=0 href=#/a I want to drag it onto this element, on the same page: div

[wtr-general] How to iterate over defined element methods?

2012-06-28 Thread Abe Heward
Hey folks! Got a head-scratcher, here. My use case: I want to create a smoke-test that verifies particular elements are present on a page. So, I define the page elements I want, using Alister Scott's

[wtr-general] Re: How to iterate over defined element methods?

2012-06-28 Thread Abe Heward
Just to avoid confusion, this is also Alister Scott's codehttps://github.com/alisterscott/wmf-custom-page-object/blob/master/lib/page_helper.rb ... on Page do |p| p.elements_exist? end -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Re: How to iterate over defined element methods?

2012-06-28 Thread Abe Heward
Ah! I have discovered the cause of my problem. Unfortunately it's not evident at all in the simplified scenario that I've presented here. On Thursday, June 28, 2012 8:43:35 AM UTC-7, Abe Heward wrote: Just to avoid confusion, this is also Alister Scott's codehttps://github.com/alisterscott

[wtr-general] Re: How to iterate over defined element methods?

2012-06-28 Thread Abe Heward
I'll be happy to post more details if anyone is actually curious. On Thursday, June 28, 2012 11:21:06 AM UTC-7, Abe Heward wrote: Ah! I have discovered the cause of my problem. Unfortunately it's not evident at all in the simplified scenario that I've presented here. On Thursday, June 28

[wtr-general] Webdriver cookies domain limitation

2012-06-12 Thread Abe Heward
Does anyone know if the limitation of the cookies feature--wherein it only shows you the cookies for the domain of the page you're on--is going to be changed any time soon? My use case is: Company A has a web page that, when visited, generates a cookie for Company B, because Company A is a

Re: [wtr-general] Cucumber Background vent (and request for advice)

2012-05-18 Thread Abe Heward
on someother.com When I try to look do something Then I should be able to or you can do something like pulling urls from a fixture @browser.goto :main_site @browser.goto :other_site and have different steps depending on what page you need to go to On Fri, May 18, 2012 at 2:31 PM, Abe

Re: [wtr-general] Cucumber Background vent (and request for advice)

2012-05-18 Thread Abe Heward
-7, Abe Heward wrote: Thanks for the post. You're using tags, which, again, is my primary complaint. But I guess that's the direction I'm going to have to go in, if we're going to use Cucumber. On Friday, May 18, 2012 12:11:03 PM UTC-7, Oscar.Rieken wrote: quick example but you may get

Re: [wtr-general] Cucumber Background vent (and request for advice)

2012-05-18 Thread Abe Heward
scenario in that feature file so if that feature was called things_only_for_active_users.feature it would not run for any other feature On Fri, May 18, 2012 at 3:25 PM, Abe Heward ahew...@rsmart.com wrote: Not to mention your given I'm an active user is now going to happen before EVERY

[wtr-general] DOM Object's offsetHeight

2012-04-12 Thread Abe Heward
Is there way to use watir-webdriver to get the offsetHeight value of a DOM object? I've got a set of elements that will become mis-positioned on the page if one of them contains a string of text that's too long, but there's no way to know this has happened by simply inspecting the html. The

Re: [wtr-general] DOM Object's offsetHeight

2012-04-12 Thread Abe Heward
YES! That works. Thanks. On Thursday, April 12, 2012 8:58:48 AM UTC-7, Oscar.Rieken wrote: I think you can do .attribute_value(the attribute you want returned) Sent from my iPhone On Apr 12, 2012, at 9:52 AM, Abe Heward abe.hew...@gmail.com wrote: Is there way to use watir-webdriver

[wtr-general] Re: Change a method from .custom_method(object_attrib) to object(attrib).custom_method?

2012-04-06 Thread Abe Heward
, but not sure yet. Jarmo On Apr 6, 4:10 am, Abe Heward abe.hew...@gmail.com wrote: I hesitate to ask this question because I feel like the answer will end up being blindingly obvious or else horribly complicated. Plus, I suppose it's more of a Ruby question than a Watir one. I'll

Re: [wtr-general] Re: Change a method from .custom_method(object_attrib) to object(attrib).custom_method?

2012-04-06 Thread Abe Heward
then you can also steal the code, which would give you the same support. I might release that Page Object support as a separate gem maybe, but not sure yet. Jarmo On Apr 6, 4:10 am, Abe Heward abe.hew...@gmail.com wrote: I hesitate to ask this question because I feel like the answer

[wtr-general] Change a method from .custom_method(object_attrib) to object(attrib).custom_method?

2012-04-05 Thread Abe Heward
I hesitate to ask this question because I feel like the answer will end up being blindingly obvious or else horribly complicated. Plus, I suppose it's more of a Ruby question than a Watir one. I'll ask it anyway... I have a page that has a list of documents on it. You can do typical things to

[wtr-general] Why would a command work in IRB but fail in the script itself?

2012-04-04 Thread Abe Heward
If I run this command in IRB it works: @browser.li(:text=/Text File/i).checkbox.set However, that same line in my test script throws this error: Watir::Exception::UnknownObjectException: unable to locate element, using {:text=/Text\ File/i, :tag_name=li} What is going on, here? Why

[wtr-general] Re: Why would a command work in IRB but fail in the script itself?

2012-04-04 Thread Abe Heward
-for-elements On Thursday, 5 April 2012 08:04:42 UTC+10, Abe Heward wrote: If I run this command in IRB it works: @browser.li(:text=/Text File/i).checkbox.set However, that same line in my test script throws this error: Watir::Exception::UnknownObjectException: unable to locate element

[wtr-general] Re: Web-driver is not able to locate where as watir 2.0 able to

2012-04-01 Thread Abe Heward
Instead of .click, try .fire_event(onclick). I don't believe the div element has the .click method. On Saturday, March 31, 2012 10:41:37 PM UTC-7, srinivasarao jyothi wrote: Hi There, I am facing so many problems when i am trying to convert my code to suite webdriver. Please help me out

[wtr-general] Re: need help on table rows columns operations

2012-03-06 Thread Abe Heward
The pattern I think you're going to want to use is something like this (you should do your own experimentation with the page you're testing to find the exact combination of Watir hows and whats, in terms of elements and tags on the page, is going to work for you): @browser =

[wtr-general] Re: how to use one default and one customize attribute syntax

2012-02-14 Thread Abe Heward
If I understand your question correctly, here's the basics of how to do it in Watir-webdriver (not 100% about Watir, but it's probably the same)... *module Watir* * class Element* *def target* * @how = :ole_object * * return @o.target* *end* * end * *end* That code will then

[wtr-general] Re: I found what the mistake wasRe: how to use one default and one customize attribute syntax

2012-02-14 Thread Abe Heward
It's helpful not to create a new thread when you are posting a reply--especially to your own messages! -- 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

[wtr-general] Re: How to hide popuped new window ?

2012-02-03 Thread Abe Heward
Can you provide a little more detail about your problem? The problem is that the new window *appears too fast???* * * And why is this a problem? What would you rather have happen, exactly? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Re: How to hide popuped new window ?

2012-02-03 Thread Abe Heward
Last question: What happens when you add the line: browser2.close ...to your script? Or do you want the window to stay open, but hidden? Basically, it would help if you provided more detail. :-) -- Before posting, please read http://watir.com/support. In short: search before you ask, be

[wtr-general] Re: watir-webdriver 0.5.2

2012-02-01 Thread Abe Heward
I just updated to 0.5.2. I then ran a script that was working yesterday and got this error: NoMethodError: undefined method `now' for Watir::Time:Class ... caused by an admittedly kludgy custom method that I've written to extend the Browser class... module Watir class Browser def

Re: [wtr-general] Re: watir-webdriver 0.5.2

2012-02-01 Thread Abe Heward
Cool. 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

[wtr-general] Re: How to access the another Ruby script value inside my Main Ruby Script

2012-01-30 Thread Abe Heward
You need to define your own Classes and Class variables (and methods) for that to work. This is more a question of how to write effective Ruby code than it is a question of how to write your Watir scripts. -- Before posting, please read http://watir.com/support. In short: search before you

[wtr-general] Re: asserting on text that may have special characters

2012-01-20 Thread Abe Heward
My first thought would be to include 'cgi' try CGI::escapeHTML(your_string) and see if that works for you. If that, or some variant, doesn't work for you then I suggest you may want to ask this on StackOverflow and see if there are any Ruby gems that will encode/decode the target string so it

[wtr-general] Re: asserting on text that may have special characters

2012-01-20 Thread Abe Heward
My first thought would be to add the line* include 'cgi' *to your scripts, then try CGI::escapeHTML(your_string) and see if that works for you. If that, or some variant, doesn't work for you then I suggest you may want to ask this on StackOverflow and see if there are any Ruby gems that will

[wtr-general] Re: Watir-webdriver seeing a null style attribute as display: none;

2012-01-20 Thread Abe Heward
Just an FYI... Turns out it was a bug that shows up when you view the page in IE9. :-) The buttons you're expecting to see don't show up in IE. Aren't browser compatibility bugs fun? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Watir-webdriver seeing a null style attribute as display: none;

2012-01-17 Thread Abe Heward
On a page I'm testing, I have a div that Firebug shows like this: div id=joinrequestbuttons_widget style= That div is a parent of a number of buttons that are displayed or hidden depending on circumstance. When I have watir-webdriver show me the HTML of that div, however, this is what it

[wtr-general] Re: Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-12 Thread Abe Heward
Alister's method, discussed here: http://watirmelon.com/2011/08/12/automate-entering-text-into-wysiwyg-editors-using-watir-webdriver/ ...works great, for me--with the exception of clicking on images in the editor's contents, as I've detailed. Even jQuery hasn't been working for me, so I've got

[wtr-general] Re: Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-08 Thread Abe Heward
You're exactly right, Chuck. It's not a pop-up at all, but a div that's hidden until the button in question is clicked. This web site's pages are chock full of these little beasties. I'll take a look at Sikuli as soon as I get a chance. Thanks! -- Before posting, please read

[wtr-general] Re: Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-08 Thread Abe Heward
Chuck, Sikuli looks interesting, but it seems like a nightmare of overhead to use with Ruby, if this blog post is to be believed: http://blackrat.org/ruby/getting-sikuli-script-working-with-jruby-on-the-mac/ I need to install Java, The Sikuli IDE, modify the $CLASSPATH, etc. etc.?! Ugh. All

[wtr-general] Re: watir-webdriver survey for adding items such as: alert_box, scroll_to, and in_viewable_area?

2012-01-06 Thread Abe Heward
For my part, I really hate item 1 and wish it would go away. -- 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-webdriver survey for adding items such as: alert_box, scroll_to, and in_viewable_area?

2012-01-06 Thread Abe Heward
Could someone provide advice on how to monkey patch watir-webdriver so that I can avoid the dreaded *Selenium::WebDriver::Error::MoveTargetOutOfBoundsError: Element cannot be scrolled into view:[object HTMLButtonElement]* error? I don't need all the other overhead of the qa_robusta gem, so

[wtr-general] Re: Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-06 Thread Abe Heward
Why test someone else's product? I'm not. Unfortunately, however, the system being tested only provides one means of getting to a dialog box I need to get to, and that's via the tinyMCE Editor. Here's the use case: Ensure the user can modify the default address value of the Google Maps item

Re: [wtr-general] Re: watir-webdriver survey for adding items such as: alert_box, scroll_to, and in_viewable_area?

2012-01-06 Thread Abe Heward
Thanks for the help, you guys! In addition to upgrading to 2.16 I wrote the following method and put it in Watir::Browser: *def back_to_top* * self.execute_script(javascript:window.scrollTo(0,0))* *end* I'll put that into my scripts if it becomes necessary (which I hope won't

[wtr-general] Re: Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-06 Thread Abe Heward
FYI, my temp solution is throwing some jquery in my methods. Fun fun. -- 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] Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-04 Thread Abe Heward
*Use Case:* Using Watir-Webdriver, I need to access a menu that appears when clicking an image in the Content Body of the TinyMCE Editor. *Problem:* Clicking the image manually brings up the menu, but I haven't found a way to get it to happen with watir-webdriver. I've tried .click,

[wtr-general] Re: Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-04 Thread Abe Heward
One more thing I noticed: when I use .right_click on the image, the Browser's context menu appears in the upper left corner of the browser window, which implies that the click event is not occurring directly on the target image itself. I'm guessing that this is a requirement for tinyMCE to

Re: [wtr-general] Clicking an image inside the tinyMCE Editor with Watir-Webdriver

2012-01-04 Thread Abe Heward
Sure thing! First, manually, go to that site and click on the tinyMCE logo in the editor. It will then look like this: https://lh5.googleusercontent.com/-qvTOc8b86gY/TwSKGqISs4I/AzQ/WDupc0lvdQs/s1600/tinymce.jpg The particular thing to note is the resizing controller that

[wtr-general] Firefox 9 and resizing the window

2012-01-02 Thread Abe Heward
I just upgraded from Firefox 6 to Firefox 9. I'm using watir-webdriver, and prior to the upgrade this command was working fine: @browser.execute_script('window.resizeTo(screen.width, screen.height)') Now the window is not resizing. Anyone know if this is some kind of security update for FF9?

[wtr-general] Re: Firefox 9 and resizing the window

2012-01-02 Thread Abe Heward
Just found the depressing answer to my own question: https://developer.mozilla.org/en/Firefox_7_for_developers#DOM window.resizeTo https://developer.mozilla.org/en/DOM/window.resizeTo , window.resizeBy https://developer.mozilla.org/en/DOM/window.resizeBy , window.moveTo

Re: [wtr-general] Firefox 9 and resizing the window

2012-01-02 Thread Abe Heward
Wow, thanks, Željko! I don't know why I didn't already know about those methods. I feel dumb. smh Abe -- 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

Re: [wtr-general] Re: FireFox 8 and mouseover and/or clicking

2011-12-23 Thread Abe Heward
I am definitely also experiencing a variant of this problem. The menu I want appears partially obscured in the upper left corner of the browser and the script throws the MoveTargetOutOfBoundsError. -- Before posting, please read http://watir.com/support. In short: search before you ask, be

Re: [wtr-general] Re: FireFox 8 and mouseover and/or clicking

2011-12-23 Thread Abe Heward
Jari, isn't there already an issue open for this? https://github.com/jarib/watir-webdriver/issues/46 -- 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

[wtr-general] Re: UTF-8 characters being ignored

2011-12-23 Thread Abe Heward
Do your scripts have the magical line... # coding: UTF-8 ... at the top? -- 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: Strange NoMethod Error for my Module

2011-12-15 Thread Abe Heward
I use cheezy's http://www.cheezyworld.com/ Page Object gemhttps://github.com/cheezy/page-object, actually. But in some cases (like this one) I need methods customized to my application, obviously. This was my first foray into the world of define_method (I'm still basically a n00b to

Re: [wtr-general] Re: Strange NoMethod Error for my Module

2011-12-15 Thread Abe Heward
There are a few different gems that help with page objects that are a bit easier to use. -- Oh, *now *you tell me, after I've written over 8000 lines of code. :-) You have any particular favorites and reasons why you like them over Cheezy's gem? -- Before posting, please read

Re: [wtr-general] Re: Strange NoMethod Error for my Module

2011-12-15 Thread Abe Heward
Thanks, guys! I love that there's always deeper coding waters out there when I find I'm ready to wade further in. -- 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

[wtr-general] Strange NoMethod Error for my Module

2011-12-14 Thread Abe Heward
Hey guys! I realize this may be a question that it would be more proper to ask in a Ruby forum, but I thought I should ask it here first since you're all so helpful... I created a module and a method that defines other methods, thus... module TopMenuBar def menu(name, menu_id, link_id,

[wtr-general] Re: Strange NoMethod Error for my Module

2011-12-14 Thread Abe Heward
Never mind. I figured it out. My method def was missing a self. ... def *self.*menu(name, menu_id, link_id, target_class) define_method(name) { -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com

[wtr-general] Element not found in cache error in Frames, Watir-webdriver

2011-10-12 Thread Abe Heward
I'm seeing an annoying issue that I suspect has to do with objects inside page frames and Selenium and Watir-Webdriver. I brought up part of it already in this post: https://groups.google.com/d/topic/watir-general/gIgtHbFxfbw/discussion Here's a similar issue: If I reference some text on a

[wtr-general] Re: Element not found in cache error in Frames, Watir-webdriver

2011-10-12 Thread Abe Heward
Oops! Chuck, thanks for the reminder about Page Object. I just discovered the source of the problem was that I had two methods with the same name in this page class. Argh! False alarm. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Test::Unit Assert throws error instead of sending false for existence of page element

2011-10-05 Thread Abe Heward
Hey guys, I'm using watir-webdriver (0.3.3) and Test::Unit. In my code I'm trying to validate that an object is NOT present on the page... assert_equal(false, @browser.button(:id=post).exist?) ...However, instead of getting the false result for the .exist?, apparently it's throwing this

[wtr-general] getAllContents equivalent in watir-webdriver?

2011-08-25 Thread Abe Heward
In Watir you can get an array of all items in a selection list menu. This method appears to be missing from watir-webdriver. I've looked through the RDocs for watir-webdriver, but can't seem to find the equivalent method. Am I blind, or is there no such method? -- Before posting, please read

[wtr-general] Re: extended ascii character not entered in IE text field

2011-07-19 Thread Abe Heward
At the top of my scripts I use the magical line: # coding: UTF-8 After that, extended ASCII should work. I know it sounds crazy. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com

[wtr-general] Watir-Webdriver and target=_blank

2011-07-15 Thread Abe Heward
While using watir-webdriver and driving Firefox 5, if I click a link... *browser.link(:how, what).click* ...and that link that has a *target=_blank* in it, then instead of opening the page in a new tab (which is what happens if I click it manually), I get a new browser window, which is no

[wtr-general] Re: Waitr fails to fire_event for select_list

2011-07-06 Thread Abe Heward
You could write your own rescue clause for the error: begin browser.select_list(:name, 'select').fire_event('change') rescue WIN32OLERuntimeError puts A message that will tell you it can't find the element you wanted. end Hope that's helpful. Abe -- Before posting, please read

[wtr-general] Re: Watir-Webdriver doesn't click the link

2011-07-01 Thread Abe Heward
Upgrading to Firefox 5 has eliminated the link clicking problem. -- 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 doesn't click the link

2011-06-29 Thread Abe Heward
Okay, this one's a head-scratcher... Environment: - Windows 7 - Ruby 1.9.2 - Watir-webdriver 0.2.5 Goal: I've got a page with a list of links, from A to Z, and I need my script to iterate through each of those links. Here's my code: #=== chars = ABCDEFGHIJKLMNOPQRSTUVWXYZ

[wtr-general] Re: Watir-Webdriver doesn't click the link

2011-06-29 Thread Abe Heward
I switched my code to try using the ids of the links instead of the text, like so: $ff.link(:id, ExternalLink_#{x}).click ...It *still *skips the letter B! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com

[wtr-general] Re: Watir-Webdriver doesn't click the link

2011-06-29 Thread Abe Heward
I spoke too soon, earlier. It's not only B that it does not click. It also fails to click on E, G, I, J, and K, so far. But the script flashes all these links without a problem. I can't see any significant differences in the formatting of the HTML for the links that work versus the links

[wtr-general] Re: Watir-Webdriver doesn't click the link

2011-06-29 Thread Abe Heward
Yet another update: It all works correctly if watir-webdriver is driving Chrome, not Firefox 3.6.13. -- 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

[wtr-general] Re: Watir-Webdriver doesn't click the link

2011-06-29 Thread Abe Heward
*ARGH!* Clicking the letter links works in Chrome, but this code, which was working fine in Firefox, does *NOT *work in Chrome: $ff.select(:id, status).select(Inactive) If I flash that select box it flashes just fine. It does not error out. It just does not update to Inactive--in Chrome. --

Re: [wtr-general] Re: Jssh Socket error

2011-06-27 Thread Abe Heward
Tried updating to Ruby 1.9.2 and Watir 1.9.0 today. Immediately ran into this same problem again when I tried to run a test script with Firefox. Firefox doesn't want to open. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Watir-Webdriver alters text containing tabs.

2011-06-27 Thread Abe Heward
Reporting this here because I'm not sure where else to post it and also because it's perhaps already been reported as a bug. I have a web page that contains tab-delimited text. When I go to that page using Watir and the following code... x = browser.text p x The output I get looks like this:

[wtr-general] Attach to existing window in Watir-Webdriver

2011-06-27 Thread Abe Heward
Watir has the .attach method. How do I attach to an existing browser window using watir-webdriver? I need this because, for example, I have scripts that delete the browser cookies file and if they can't do this they look to see if there are open browser windows, close them, then try to delete

Re: [wtr-general] Attach to existing window in Watir-Webdriver

2011-06-27 Thread Abe Heward
Found something that will hopefully be helpful... http://www.natontesting.com/2009/09/21/kill-process-by-name-using-ruby-on-windows/ -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com

Re: [wtr-general] Watir-Webdriver alters text containing tabs.

2011-06-27 Thread Abe Heward
It's been a simple matter of putting the link to the file in the browser address bar. I suppose I can switch to opening it directly, though. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com

Re: [wtr-general] Watir-Webdriver alters text containing tabs.

2011-06-27 Thread Abe Heward
Ah. Okay. Here's why I can't do that: Because the file is on a server whose drive is not mapped locally. So, File.open(http://69.71.52.209/tmp/fb-pixels.log;, r) results in a The system cannot find the file specified. error. -- Before posting, please read http://watir.com/support. In short:

Re: [wtr-general] Watir-Webdriver alters text containing tabs.

2011-06-27 Thread Abe Heward
Sweetness! You rock. -- 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: Somewhat philosophical question about persistence of Watir's page object variables...

2011-06-15 Thread Abe Heward
Thanks, Chuck! -- 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: Somewhat philosophical question about persistence of Watir's page object variables...

2011-05-27 Thread Abe Heward
Yes. I understand the mechanics of what's going on. I was wondering the why, though. Sadly, it looks like it's the same amount of code to write, either way you go. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Somewhat philosophical question about persistence of Watir's page object variables...

2011-05-24 Thread Abe Heward
So, I navigate to a page on my test site and define a bunch of variables as page objects, like so: site_name = browser.text_field(:id, sitename) site_url = browser.text_field(:id, url) etc. ... I then navigate to a new page with a browser.goto. On the new page I define some additional

[wtr-general] Re: Watir simple field recorder

2011-05-22 Thread Abe Heward
What's the thinking behind going with the structure... def field_name browser.thing(:how, what) end ...versus simply: field_name = browser.thing(:how, what) ? Are there advantages/disadvantages with each? -- Before posting, please read http://watir.com/support. In short: search before

[wtr-general] Re: How to utilize resulting array from browser.links.find_all { |x| x stuff } command

2011-05-22 Thread Abe Heward
Good to know. 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

[wtr-general] How to utilize resulting array from browser.links.find_all { |x| x stuff } command

2011-05-19 Thread Abe Heward
I need to get the href value of links on a page that match a regex. So, I run this code: product_links = browser.links.find_all { | link | link.class_name =~ /(Product|Detail)/i } I get back an array of matching links. This is great. However, the contents of the array include more than just

[wtr-general] Re: How to utilize resulting array from browser.links.find_all { |x| x stuff } command

2011-05-19 Thread Abe Heward
Figured out the answer myself. After the fact it's obvious: product_links[0].href -- 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

Re: [wtr-general] Re: Jssh Socket error

2011-05-04 Thread Abe Heward
Test script won't start Firefox. I need clarification on this, because I recently updated two machines--one Windows 7 and one XP--to Ruby 1.9.2 and Watir 1.8.1. Both machines have FF 3.6.17, with the 0.9 jssh plugin installed. Both machines, prior to the update, ran my Firefox scripts without

Re: [wtr-general] Re: Jssh Socket error

2011-05-04 Thread Abe Heward
In the interest of completeness and clarity, here's the text of the error we get: C:/Ruby192/lib/ruby/gems/1.9.1/gems/firewatir-1.8.1/lib/firewatir/firefox.rb:156:in `rescue in set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and

Re: [wtr-general] Re: Jssh Socket error

2011-05-04 Thread Abe Heward
UPDATE: Reverting the machine to using Ruby 1.9.1 clears up the problem. Sad, because I was hoping to be able to continue to move to using Watir-webdriver more and more, as it matures, but Watir-webdriver has issues with Ruby 1.9.1. -- Before posting, please read http://watir.com/support. In

Re: [wtr-general] Error opening new Firefox window with Watir-Webdriver

2011-04-27 Thread Abe Heward
Firefox now opens without error. This is great. Unfortunately I've run into other incompatibilities and unsupported methods, now. I'll detail those in other posts. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

Re: [wtr-general] Error opening new Firefox window with Watir-Webdriver

2011-04-26 Thread Abe Heward
Thanks for the info. Based on what I've seen on the blogosphere, upgrading from 1.9.1 to 1.9.2 is not pleasant. I'll report back my results once I get through it. Not going to be today, though, since I have a bunch of regression scripts to run in order to pass a release candidate. Not a good

[wtr-general] Error opening new Firefox window with Watir-Webdriver

2011-04-25 Thread Abe Heward
When running a Webdriver script against IE or Chrome (in Windows 7 or XP) everything works great. However, as soon as I switch it to Firefox, with this command: browser = Watir::Browser.new :firefox The script fails when trying to open the browser, with this error message:

Re: [wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
Unfortunately that just fails with an unknown method error. There aren't any text fields in the part of the screen that I want to get to. Perhaps this method only works with text fields? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
My code: $ff.checkbox(:id, stdOptOut).document.scrollIntoView Error result: test.rb:7:in `main': undefined method `scrollIntoView' for :String (NoMethodError) -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com

[wtr-general] Re: Moving a window

2011-04-21 Thread Abe Heward
Still get the same error. Oh well. -- 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

  1   2   >