Thanks. I will say I have had no apparent problems using win32ole functionality
with the 1.8.4 version of Ruby I have installed -- not with Watir 1.4.1, nor
with any of the 1.5.x builds. So...maybe I have just been lucky?
-
Putting in:
==
include Win32
==
without quotation marks, above the:
==
def enabled_popup(timeout=4)
==
is indeed the fix.
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4715messageID=13079#13079
I find that WatirMaker is only useful to build a raw framework for a script.
After stepping through your site, go into the created script, delete all the
garbage (errors and failures) and then manually put in what is needed. The
simpler the site, the fewer the errors. For a complex site the
A separate issue is whether the Wikipedia article should include code
that only works with an experimental library in an unreleased version of
Watir.
A valid point. I do point out immediately following the example that it may be
necessary to download and install the current development Watir
Sorry to vent, but I'm the author of the enabled_popup() method (which
has been removed from watir.rb) and the one that helped Sun solve his
problem when he presented it to the list.
If enabled_popup() has in fact been removed entirely, this will be a problem I
think -- since I need
A comment -- when substituting this:
===
#Ensure popup won't block Watir
ie.button(:name, btnG).click_no_wait
ie.dialog.button('OK').click
===
for this:
===
#Ensure popup won't block Watir
ie.button(:name, btnG).click_no_wait
#Handle the popup
hwnd = ie.enabled_popup(5)
if (hwnd) #yes there is a
Thank you. So I did access the link, download the extended MS help, and
accessed VBAXL10.CHM. I found a method called AutoFit.
===
#Format workbook columns
worksheet.range(b1:b4).Interior['ColorIndex'] = 36 #pale yellow
worksheet.range(b:b).AutoFit
===
However, because I was originally working
Sun wrote:
So I can open the csv file as an Excel file and
make a format change (turn the 2nd column yellow.)
But -- I cannot find anywhere, on any forum, or the
Ruby online documentation, how to autofit the
column to the text.
Chris Morris has a link in the RubyGarden page that
has
Regarding documentation, please see: http://en.wikipedia.org/wiki/Watir
I have updated this by creating an example information section, plus updating
the base note, and adding links to External Links and See Also.
-
Posted via
Technically this is a Ruby question but...since it is useful to record test run
timing information in Excel format, I think it is relevant to this forum. The
question is...suppose I write out some test output that looks like this:
===
Test, Acceptable log in time, 5, Actual time to log
I would be open to helping with the documentation.
I think part of the effort is not just upgraded documentation, but the
organizational perspective fof the documentation.
For a single example -- is the base or root for documentation the
http://wtr.rubyforge.org/ site? As it happens, the user
Well...
(1) There should be documentation that specifically
states how to drive a Javascript -- as in, use
.link(:url, path)
(2) It should point out that it is driven by
click, not fire_event('onclick').
(3) Actually, there should be documentation that
identifies all of the available
BTW -- once you KNOW that link is the way to go, links will reveal the
JavaScripts. As in:
ie.frame(top_frame).links.each { |l| puts l.to_s }
And that's the secret.
-
Posted via Jive Forums
When I execute:
ie.goto(javascript:Events.invokeEvent('2_11_act'))
in FreeRIDE the script gets to that point and hangs.
When I CTRL-C it (in the terminal window) the error is:
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./watir.rb:1752:in `sleep':
Interrupt
from
Bit more info.
1st, the javascript in question exists within a nested table structure (this is
table #5) within a frame. I can actually make the text that is displayed in the
table cell flash (with this):
ie.frame(top_frame).table(:index, 5)[2][2].flash
And I can actually make it highlight
Sun wrote:
Anyone have any suggestions?
Send us the html for the entire lt;tdgt; tag. You've only
posted a fragment.
OK. But since it is 5 tables deep...and very complex, I will just post the
table involved:
===
lt;table cellpadding=0 cellspacing=0 border=0gt;
lt;trgt;lt;td rowspan=2
OK thank you again. Can you tell me -- where to find good documentation on Ruby
libraries like WinClicker? I see a lot of basic Ruby language
documentation...but not much on libraries (if that is the right word.)
Actually, if I do gem list I see several win32-* gems...I presume the
WinClicker
I have a piece of Javascript that I need to invoke via Watir. Here is the
Javascript code:
td class=off nowrap
scriptmenuStart(TAB_MENU_OFF,'AuC/uCOUNT','javascript:Events.invokeEvent(\'2_11_act\')','ACCOUNT','AccountTab');
registerMenuShortcut('C');
/script
Now if this was a Javascript link
Problem resolved.
First -- I don't actually know if this is, or is not, a modal dialog, since the:
if (modal = ie.modal_dialog(:hwnd, hwnd))
statement cannot be parsed (because apparently, even in the 1081 code branch
the :hwnd parameter is not recognized for this method call.)
However, I
Sun,
If the window only has the title Internet Explorer
then it's not likely that it's a modal dialog. This sounds more
like an IE warning dialog, which is quite different.
I cannot duplicate that warning box on my copy of IE,
probably because I previously unchecked the box
One more thing...just so you know, when I puts $LOAD_PATH here is the library
info:
===
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir/win32ole
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/bin
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/.
c:/ruby/lib/ruby/site_ruby/1.8
Also, if I recode it like this:
===
require 'watir'
require 'test/unit'
class TC_article_example Test::Unit::TestCase
def test_search
# open the IE browser
ie = Watir::IE.new
# steer to google
ie.goto('http://www.google.com/')
# load the search field
I have a popup titled simply Internet Explorer containing the text: When you
send information to the Internet, it might be possible for others to see that
information. Do you want to continue? There are two buttons, labeled Yes and
No.
I am unable to attach to this like so: ie2 =
23 matches
Mail list logo