Moshen,
I believe that browser.close is still supported in Watir v1.9.2 or
later,
while browser.quit was deprecated awhile ago.
I think SafariWatir still has a quite method.
Joe
On Sep 15, 3:38 am, Mohsen Qureshi mohsen...@googlemail.com wrote:
Hi guys,
I would like to know if there is a
If I'm reading this correctly, your issue is that the line of code:
ie.form(:id,'commonLoginform').text_field(:name,
'username').set'$user'
is incorrectly setting the name of the variable ($user) and not
the value held in that variable. When you quoted $user it was
being defined as a String,
I don't think Watir does. Even watir-webdriver which supports a wider
set of HTML tags doesn't list svg or rect as a supported HTML tag.
http://rubydoc.info/gems/watir-webdriver/0.3.3/Watir/HTMLElement
Joe
On Sep 14, 9:41 am, al3kc aleks.kiev...@gmail.com wrote:
Hi,
I have the following svg
Anand,
Have you suddenly changed something on your computer that may
correspond to the sudden error you are now seeing? I'd start looking
there.
What is the HTML that you are testing against that causes this error?
What is the Watir code that you are using to test it?
What is the command that
Idan,
What is the certain environment that it is failing in?
What environment is it working in?
What is the HTML code you are testing against?
What is the Watir code you are testing with?
What it the command that is failing?
If you could answer these questions it would be easier to assist.
Abe,
In Watir look for 'options' and 'selected_options' in the class
Watir::SelectList
In watir-webdriver look for 'options' and 'selected_options' in the
class Watir::Select
Joe
On Aug 25, 1:32 pm, Abe Heward abe.hew...@gmail.com wrote:
In Watir you can get an array of all items in a
Look into Ruby's Begin/rescue/ensure/end
Just Google 'ruby begin rescue ensure' for details
In a nutshell its format is...
begin
# Code you want to trap errors on goes here
# such as your assert statement
rescue
# code to deal with errors goes here
# such as calling your screen
You didn;t mention if oyu are using Watir Firewatir or watir-
webdriver.
If using Watir look into Waitr:IE.attach()
If using Firewatir look into FireWatir::Firefox.attach()
If using watir-webdirver look into browser.window.().use
Hope that helps,
Joe
On Aug 24, 2:35 am, GJHmf
Kyle,
Looks like you've followed the info at:
http://code.google.com/p/selenium/wiki/ChromeDriver
Including:
a) Downloading the chrome driver for your OS
b) Installed it in a location on the file system that is in the OS
search path
(e.g. /usr/bin/)
See if /usr/bin is in the PATH used
Check the version of win32-api that is installed.
The error message is indicating that:
Could not find win32-api (= 1.3.0)
From a Windows command window type:
gem list
Does the list include a version greater than 1.3.0?
If it isn't listed, install the current gem
gem install
Try specifying the Frame by their index. You've already found:
browser.show_frames:
there are 2 frames
frame index: 1 name:
frame index: 2 name:
So try locating them using the frame's index
depending on which iFRame your element resides within:
browser.frame(:index =
I strongly suggest you install the roo gem. It suppports:
OpenOffice, Excel and GoogleDOcs workbooks.
See: http://roo.rubyforge.org/
To install on Windows:
gem install roo
To install on OSX:
sudo gem install roo
I use it on Linux, OSX, and WInXP, Vista, Win7 and it saves a lot of
work!
Hillary,
See if specifying the ASCII code for the Carriage Return will work.
The Carriage Return is ASCII character 10.
Here an example in irb:
irb(main):006:0 putsa + 10.chr + b + 10.chr + c
a
b
c
= nil
So you code would be:
b.text_field(:id, x).set(a + 10.chr + b + 10.chr + c)
Joe
On Aug
The code is incorrectly specifying the index as a string not an
integer.
Thus
@utable=ie.div(:id,mainContainer).table(:index,2)
should be
@utable=ie.div(:id,mainContainer).table(:index, 2)
Joe
On Aug 10, 7:44 pm, lifeng jiang jiangsqu...@gmail.com wrote:
hi all:
I am using
Rahul,
I think you'll have to deal with it using some logic.
Here's an example in irb:
irb(main):001:0 sString = true
= true
irb(main):002:0 sString.match(/(true|t|yes|y|1)$/i) != nil
= true
Joe
On Jul 5, 7:54 am, Rahul Sharma rahulsharma@gmail.com wrote:
Hi Guys,
Any way to pass in a
Jasmine,
Try the tables index.
For example if it was the first table on the page:
browser.table(:index, 0). # 0 based index, not 1 based index
Joe
On Jul 1, 12:17 am, Jasmine nicely...@hotmail.com wrote:
Hello
I need to locate the table,then locate the tr and td,but the table
doesn't
Amit,
Suggest you look into the Watir methods
wait
wait_until
You can read up on them in the RDoc
http://wtr.rubyforge.org/rdoc/1.6.5/
At those points in the script where you need to acount
for network timing issues, add a wait/wait_until
command for some HTML element on the page to be
Jari ,
Does this mean that when using webdriver:
1) If you start Firefox:
browser = Watir::Browser.new
that it runs with all addins disabled.
2) If you start Firefox:
browser = Watir::Browser.new(:firefox, :profile = default)
it runs with your default addin settings
Amit,
These are indeed a Ruby questions NOT a Watir questions.
I appreciate your candor in noting that with your question.
The answers to your questions are:
1. Where to save this class so that I will be able to include it in my
scripts?
A: You can save it anywhere you like in the file system
Zeljko is correct that this is a Ruby question, not a Watir issue.
Recommend you refer to the Ruby Rdoc: http://www.ruby-doc.org/core/
Look at the Classes Dir, File and FileTest, and you'll see
methods Ruby has for files.
Joe
On May 11, 12:49 am, Mahesh mahesh...@gmail.com wrote:
Hi,
can
Ranjith,
If you just want to check that the Status bar text is Done
then this loop will work, since Watir can read the Status text
in IE of Firefox.
# Loop until the status bar text is Done
while(browser.status != Done) do
sleep(1)
end
Joe
On May 5, 10:47 pm, ranjith kumar
Mayank,
I believe Quality Center can launch external scripts via the command
line.
If so, it can be used to launch a Ruby script, and thus launch a Ruby
script that uses Watir, or FireWatir. It may also be able to read the
return code from that script to determine Pass/Fail stauts of the
script.
Sergey,
I wouldn't say its a bug, but that its a fine example of how
different coding techniques can affect performance.
In your first code example Ruby has to perform the regular expression
check
once in each loop, on every element in the set (that's 111 loops and
111 checks).
While in your
Chaos King,
I think you've already been supplied several ways by this group to
scroll the window,
but as part of your initial question you asked...
I need to move the windows
To do that just have the browser to goto a URL, for example:
require 'rubygems'
require 'watir'
browser =
One other way to consider is using Virtual Machines (VM's).
Create VM's with different combinations of Browser, Ruby and Watir.
It takes a bit of time to get the VM software and the various VM's
setup
initially, but saves a ton of time in switching between OS's and in
trying
out new Browser,
When I'm working with elements within a nested element, I collect the
number of that elements (e.g. table) present on the page, then loop
backwards through them starting with the deepest nested element
(the one with the highest index number), and
start looking for the element I'm interested in
I believe that this is a know issue with Firewatir. Many of us have
run into it already.
For the details and the fix see:
http://jira.openqa.org/browse/WTR-428
Joedio
On Dec 13, 6:24 pm, Ekin Han nbkhic...@gmail.com wrote:
Hi friends,
When i using firewatir i found that i can not using
The RDoc entries for Watir 1.6.7 wait methods (wait_until_present,
wait_while_present, etc.), are found in the Commonwatir RDoc, NOT in
the Watir or FIreWatir RDOcs. The Commonwatir RDoc is located in my
install tree at:
C:\Ruby\lib\ruby\gems\1.8\doc\commonwatir-1.6.7\rdoc\index.html
Your
There are indeed commands in Ruby to do what you are looking to do.
Suggest you look through the Ruby Rdocs or post to a Ruby group.
http://ruby-doc.org/core/
Look at the grep command and the fileutils.
If you need your test to do something outside of the browser you
need to spend some effort
I would advise against using AutoIT for manipulation of Excel
through the GUI when there are Ruby gems that let you
access Excel through its API.
For example I've had great success using the Excel Interface Class
http://wiki.openqa.org/display/WTR/Excel%20interface%20class
This ruby class
There is no magic bullet here.
Suppressing Web Analytic collection during test execution cycles is
not
an issue specific to Watir. Any Manual test process or Automated test
tool
run against a web page that implements Omniture SiteCatalyst,
Google Analytics or any other web activity monitoring
When I'm working with elements within nested tables I collect the
number of tables then loop backwards through them starting with the
deepest nested table (the one with the highest index number), and
start looking for the element I'm interested in there, if its not
found
continue to the next
If you need info on a method be sure to check out the Watir Rdoc.
http://wtr.rubyforge.org/rdoc/1.6.5/
It has syntax info on this method that may answer your questions.
Joe
On Aug 23, 12:18 am, Zubair zubair.rk...@gmail.com wrote:
Please tell me how does Watir::Waiter.wait_until(t){ obj
Cyril,
Suggest you create one bat file that calls the other bat files, then
launch that bat file instead of the four individually.
Use DOS to do the DOS specific tasks.
Joe
On Aug 12, 11:11 pm, cyril.gonsal...@mastek.com
cyril.gonsal...@mastek.com wrote:
Hi,
I want to run four bat file
I run VIsta on a 64 bit system, and have run into two issues tha
tothers on this fourm have assisted me to resolve,
1. On Vista or WIn7 disable the Windows User Account Control (UAC)
http://windows.microsoft.com/en-ZA/windows7/turn-user-account-control-on-or-off
2. Perform the
Oops,
One minor correction. Select list use
the select method, not the set method.
# Select the value
browser.select_list(:how, what).select(sSelection)
Sorry
On Jul 18, 7:46 am, joedio joe...@comcast.net wrote:
# Set the current value
browser.select_list(:how, what).set
Sorri,
Presuming that the CSV file is saved to an array
contains data like this:
aMultiSelectValues = ['Selection A, Selection b]
# Loop trough the selections
aMultiSelectValues.each do | sSelection |
# Set the current value
browser.select_list(:how, what).set(sSelection)
end
Joe
On Jul
Good advice guys!
I am running on both Visa and Windows7 (two different PC's).
Both systems have the out-of-the-box Windows User Account
Control settings. Thus when I ran my scripts from the
ScITS/Scintilla tool it was NOT launching ruby from a Console
started with Admin rights.
When I
skyski,
You mentioned that:
somehow I think the javascript gets invoked and a parm passed by
hovering over and then clicking
I see that you've tried firing an onClick event without success.
ff.image(:src, /blank.gif/).fire_event(onClick)
Perhaps you need to account for the hover by firing an
#
# Watir fails to get url for a file on the local file system, but not
for same file on server
# even though both files are the same, only difference is one is
hosted is on server
# while the other is on local file system. Both files load OK into the
browser.
require 'rubygems'
require 'watir'
: Watir::Radio
enabled?: true
getState: false
innerText:
isSet?: false
name: radioRange_reqDetailExpiration_1
type: radio
value: Custom
visible?: true
inspect: #Watir::Radio:0x30ed3fc located=false how=:index what=15
value=nil
E
Finished in 153.359 seconds.
On Jul 4, 7:17 am, joedio
I got your original code to work as well
Joe
$ie.radios.each do | oMyObject |
if(oMyObject .id == ID_OTHER_OPTION_BUTTON)
puts(yes)
else
puts(NO)
end
end
--
Before posting, please read http://watir.com/support. In short: search before
of 1.
On Jul 2, 9:05 am, joedio joe...@comcast.net wrote:
Schlomit,
Could you post the code you created from my example
so folks can look at it to try to determine why the conditional
is not working? Please include the output as well.
Thanks,
Joe
On Jul 2, 5:59 am, Željko Filipin
Christina,
The short answer to your questions is Yes.
You can do all that with Ruby. Ruby can run multiple threads, you can
write code with Ruby to open FTP, SSH or other remote file transfer
methods, and you could definitely write Ruby code to do that, but its
not a
part of Watir per se. The
oAutoIt.WinClose(about:blank, )
This would at least get the code working with IE6 without hanging.
Joe
On Jul 2, 4:13 am, asheesh misra asheeshmisr...@gmail.com wrote:
Hi Joedio,
Thanks for the reply. However, may I humbly submit that the titles have been
hardcoded deliberately since
Schlomit,
Could you post the code you created from my example
so folks can look at it to try to determine why the conditional
is not working? Please include the output as well.
Thanks,
Joe
On Jul 2, 5:59 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
2010/7/2 Shlomit Gazit
NO you can't use Watir for automating other Windows apps, you would
use Ruby itself.
If you want to automate Windows apps through their GUI API try using
Ruby with AutoIt. Watir makes use of some of AutoIt's capabilities,
but
there is much more htat AutoIt can do. Suggest downloading the full
Shlomit,
This may work for your situation:
# Define the element ID to be acted upon
myID = your_id
# Loop through the radio elements
browser.radios.each do | radio |
# Separate the matching radios
if(browser.radio(:id, myID ))
# Do whatever you need to do with it (e.g. set it)
Kiran,
You didn't mention what objects it works/fails with. Is it only
working for a particular type of object, and failing on another type
of object?
Is it possible that the reason Watir's click() method does not work
for your situation is that the java script for the objects you are
trying
to
Asheesh,
I see from the code you supplied that when running with IE6 you
are passing to AutoIt one title as a variable...
window_title = File Download
ai.WinWaitActive(window_title,prompt_message,1)
have another title hard coded as Save As
ai.WinWait(Save As, Save in, 5)
and
Ajitesh,
While I'm not sure why you would click on a div,
but here's one way you could click on the last one:
# Get the total number of the div elements on the page
iLastDivIndex = browser.divs.length
# Click on the last div element
browser.div(:index, iLastDivIndex).click
Joe
On Jun 25,
I'll also avoid the debate on the benefits and drawbacks of recorders
but I'll mention that there is another Watir Recorder available,
and it includes an IDE and test framework .
Check out TestWise, available at: http://itest2.com/
I'm personally not using it, but it looks very promising.
Joe
James,
While you didn't tell us know what OS you're running, I can see from
the
the c\: in the error report that its some flavor of Windows (XP,
Vista, Win7, etc.)
Make sure of the following:
a) You are Logged into Windows as a user with Administrative rights
b) If installing via the Ruby
Naresh,
Suggest you look into installing a
Ruby/Oracle gem:
http://rubygems.org/search?query=oracle
Or one of the general Ruby/Database gems:
http://rubygems.org/search?query=database
Others may have suggestions on any that they've preferred.
Joe
On Jun 17, 12:07 am, naresh
Not sure if you want to skip entering a text into the text field
when the value read from the spreadsheet is blank, or you
want to clear the text field.
To differentiate between those two cases save the string nil
into those cells when no action is required and try this:
Presuming that you have
Željko,
Thanks! That works like a champ. You saved me a lot of time!
Joe
On Jun 9, 9:02 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
On Tue, Jun 8, 2010 at 9:37 PM, joedio joe...@comcast.net wrote:
myID = browser.sElement(:index, 1).id
Try this:
myID = browser.send(sElement
Is there a way to with Ruby/Watir to specify an element in the browser
as a variable?
I'm trying to parse though a set of elements on the web page to get
the setting of a specific attribute for each element.
This example below fails with the following:
undefined method `sElement ' for
Sorry but I don't know of a means in Watir1.6.5 to tell which object
has focus,
Watir's Watir::Element class lacks in_focus? or focus? methods.
It has focus method to set the focus, but not a method to
verify if an element is in focus (e.g. browser.link(:how,
what).in_focus?)
Or which element
Marlon,
Perhaps checking the browser's status bar to see that the status is
Done may work. I've run into similar situations when testing SOAP
applications where a user interaction on one element on the page
triggers the population of a select list. If you're app is written
well, the status text
Some things to try.
a) Look at the HTML source for each of the variants of the page, and
try to identify and common attribute that Watir can use to distinguish
them. Perhaps while the button's text may change (e.g. Recherche
Google or Google Search, some other attribute remains constant
(e.g. it
Dave,
You need to determine what user interaction activates the java script.
Is it when the user clicks on some HTML element,( a link, a button,
etc), is it when the user enters text in a field, or whatever?
Once you know that key piece of information examine the HTML code for
that element to
If I'm understanding this, the root issue is NOT with the disabled
button, but is with the text field that should enable the button,
(once the text field is filled in).
There may be a fire event attached to that text field which is NOT
being met when you run with Celerity. As I understand it
The Watir tabindex method you used is for HTMl tags with a tabindex
attribute.
For example:
a href=#interactive tabindex=1 Link A/a
a href=#interactive tabindex=2 Link B/a
As you mention, your web page is NOT using the tabindex attribute,
thus the method return 0.
Perhaps you could use
Betsy,
One of the things to do is to gather info on the execution
environment. Perhaps somewhere during the scripts execution of the
first (working) and second (failing) attempt, something is either
trying to require or include safariwatir, or the browser type
(Watir.options[:browser]) is getting
of Variables loop
On Apr 30, 9:43 am, joedio joe...@comcast.net wrote:
Betsy,
One of the things to do is to gather info on the execution
environment. Perhaps somewhere during the scripts execution of the
first (working) and second (failing) attempt, something is either
trying to require
.
-c
On Thu, Apr 22, 2010 at 11:00 AM, joedio joe...@comcast.net wrote:
In Watir 1.6.5 it appears that the method check_for_http_error does
NOT support IE8, as there is NO check for 8.0, only for 7.0, or a
default to IE6. I noticed this because some pages I've hit in my tests
run in IE8
In Watir 1.6.5 it appears that the method check_for_http_error does
NOT support IE8, as there is NO check for 8.0, only for 7.0, or a
default to IE6. I noticed this because some pages I've hit in my tests
run in IE8 are NOT raising NavigationException's even when one has
occurred.
Here's the
PM, joedio joe...@comcast.net wrote:
Installed Watir (v1.6.5) on top of Ruby (v1.8.6) on my 32bit WinXP and
64 bit Vista systems. Ran into way too many issues trying to use Ruby
1.9.1 (64-bit) and Watir(v1.6.5), so degraded to try these older
versions, as Watir site recommends
68 matches
Mail list logo