Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-25 Thread Bach Le
I thought the two problems are related because in neither instance was watir 
able to find the window after it was created (I didn't look into the 
specifics). I did look into it some more after this post and I found out that 
it was Vista's security settings that caused watir to break. Turning off these 
security settings fixed it. I don't remember the details right now but as soon 
as I get my vista box up and running again, I will update the JIRA ticket and 
this thread with the details. I'm back on my old machine now which is running 
XP. I'll switch back a little later in the day so I'll update in a few hours.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-25 Thread Bret Pettichord
Bach Le wrote:
 I thought the two problems are related because in neither instance was watir 
 able to find the window after it was created (I didn't look into the 
 specifics). I did look into it some more after this post and I found out that 
 it was Vista's security settings that caused watir to break. Turning off 
 these security settings fixed it. I don't remember the details right now but 
 as soon as I get my vista box up and running again, I will update the JIRA 
 ticket and this thread with the details. I'm back on my old machine now which 
 is running XP. I'll switch back a little later in the day so I'll update in a 
 few hours.
It would be great if you could get us that information. We've had a lot 
of vista-related complaints lately and this will surely help.

Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-25 Thread Bach Le
So here is how I fixed my problem:

1. Goto the Control Panel
2. Click on User Accounts
3. Click on User Accounts again
4. Select the account you are using
5. Click Turn User Account Control on or off
6. Turn User Account Control off

This allowed Shell.Application.Window to find the correct window when IE is 
created in a test.

Hope that helps everyone else. I'll update the JIRA ticket as well.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bach Le
I've installed watir 1165 and tried using IE.new_process on Windows Vista and 
in both tests and irb, IE.new_process fails. It fails after creating the window 
when it tries to get the process id from hwnd. 

I have a coworker who installed this on his Vista machine and it works fine. 


The problem is that Shell.Application.windows does not get all of the windows 
but just the ones that are browsing the file system so the IE windows do not 
show up in this list. It ends up doing in an infinite loop and never breaks out 
of it.


Does anyone have any idea how to fix this?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bret Pettichord
Bach Le wrote:
 I've installed watir 1165 and tried using IE.new_process on Windows Vista and 
 in both tests and irb, IE.new_process fails. It fails after creating the 
 window when it tries to get the process id from hwnd. 

 I have a coworker who installed this on his Vista machine and it works fine. 


 The problem is that Shell.Application.windows does not get all of the windows 
 but just the ones that are browsing the file system so the IE windows do not 
 show up in this list. It ends up doing in an infinite loop and never breaks 
 out of it.


 Does anyone have any idea how to fix this?
   
Thanks for the report. I've logged this as 
http://jira.openqa.org/browse/WTR-156

I am in the process of migrating this functionality into core watir and 
would like to get problems like this fixed.

I guess the next step is to figure out why the Shell.Application windows 
are not including any of the IE windows. That is definitely a problem, 
and, as stated, would be a core MS bug.

The other possibility might be that it actually is showing up in this 
list, but there could be a flaw in the logic we are using to decide 
whether it is an IE window or not (there have been other flaws in the past).

Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bach Le
Bret, the problem actually exists for IE.new as well. I create a new IE window 
with IE.new and it creates the window but when I call the goto method to 
navigate to any page, a new IE window shows up and the navigation is done in 
that window.


I've updated the ticket to include this information.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about IE.new_process and Vista

2007-05-24 Thread Bret Pettichord
Bach Le wrote:
 Bret, the problem actually exists for IE.new as well. I create a new IE 
 window with IE.new and it creates the window but when I call the goto method 
 to navigate to any page, a new IE window shows up and the navigation is done 
 in that window.


 I've updated the ticket to include this information.
Why do you think the two problems are related?
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about wait_until(n) {element.exists?}

2007-03-27 Thread Bret Pettichord
John Lolis wrote:
 waitr 1136

 Lets say I have the following action i want to perform

 $ie.frame('Frame').table(:id,'ID).table(:index,1)[1][2].click

 But, the this is frame heavy page, and wait sometimes doesn't play nice, so I 
 decide to do

 element = $ie.frame('Frame').table(:id,'ID).table(:index,1)
 wait_until(30) { element.exists? }
 element[1][2].click

 In my mind the above says, keep looking for element until it exists, if it 
 doesn't fail. What happens though is .exists? throws an exception when it 
 can't find the element making the whole thing not work.
   
 It seems that exists should never throw an exception, it should always be 
 true or false. Yes its there or no its not.

 In watir.rb I think this is the offending code
 # Returns whether this element actually exists.
 def exists?
   begin
 locate if defined?(locate)
  rescue WIN32OLERuntimeError
 @o = nil
   end
   @o ? true: false
 end
 alias :exist? :exists?

 The rescue doesn't seem to be broad enough. Lower down the stack trace i 
 notice that asset_exists is doing the following

 unless ole_object
 raise UnknownObjectException.new(Unable to locate object, using [EMAIL 
 PROTECTED] and [EMAIL PROTECTED])
 end

 which exists can't handle. If in exists i make the rescue a 'catch all' 
 everything works like a champ (but i'm not sure what effects that has on the 
 system).

 Hope that made sense.
   
Excellent report and analysis. I think I agree that this is a bug and 
that it needs to be fixed along the lines that you suggest.

Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about wait_until(n) {element.exists?}

2007-03-25 Thread sathees
The Exception occurs by the timeout which you gave as (30). if you can post the 
Error here I can help you further!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question about wait_until(n) {element.exists?}

2007-03-23 Thread John Lolis
waitr 1136

Lets say I have the following action i want to perform

$ie.frame('Frame').table(:id,'ID).table(:index,1)[1][2].click

But, the this is frame heavy page, and wait sometimes doesn't play nice, so I 
decide to do

element = $ie.frame('Frame').table(:id,'ID).table(:index,1)
wait_until(30) { element.exists? }
element[1][2].click

In my mind the above says, keep looking for element until it exists, if it 
doesn't fail. What happens though is .exists? throws an exception when it 
can't find the element making the whole thing not work.

It seems that exists should never throw an exception, it should always be true 
or false. Yes its there or no its not.

In watir.rb I think this is the offending code
# Returns whether this element actually exists.
def exists?
  begin
locate if defined?(locate)
 rescue WIN32OLERuntimeError
@o = nil
  end
  @o ? true: false
end
alias :exist? :exists?

The rescue doesn't seem to be broad enough. Lower down the stack trace i notice 
that asset_exists is doing the following

unless ole_object
raise UnknownObjectException.new(Unable to locate object, using [EMAIL 
PROTECTED] and [EMAIL PROTECTED])
end

which exists can't handle. If in exists i make the rescue a 'catch all' 
everything works like a champ (but i'm not sure what effects that has on the 
system).

Hope that made sense.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question regarding buttonmenu

2007-03-13 Thread Mathew Jacob
Hi,

 

 I have one scenario that buttonmenu and two items in that buttonmenu.
What is the command to select item in buttonmenu. Please guide me.

 

Regards,

 

Mathew

 

 

 


Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925

 

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question regarding buttonmenu

2007-03-13 Thread Charley Baker

Some html sample code would be helpful.

-c

On 3/13/07, Mathew Jacob [EMAIL PROTECTED] wrote:


 Hi,



 I have one scenario that buttonmenu and two items in that buttonmenu.
What is the command to select item in buttonmenu. Please guide me.



Regards,



Mathew





* *


*Ya**ho**o India, EGL, Bangalore – 71, Phone:+91-80-30516346,
Mobile:+91-9945849925*



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question About Test Suite

2007-02-06 Thread Maisonnette
Yes, and your tests function must be start with 'test_' in every test case 
file ... (http://rubyforge.org/pipermail/wtr-general/2006-July/006762.html)
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6414messageID=18212#18212
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question About Test Suite

2007-02-05 Thread Charley Baker

Take a look at the documentation for test/unit:
http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html
The method to run the test suite should be outside your test suite class.
TestSuite also doesn't have setup and teardown methods, those are test case
methods. No reason to call start on the TestRunner, creating a new instance
and running it will start the test run.

So your suite should look more like this:
require 'includes'

require 'a'
require 'b'

class TS_MyTests



def self.suite
suite = Test::Unit::TestSuite.new(All tests)
suite  TC_a.suite
suite  TC_b.suite
return suite
end
end




FileUtils.mkdir_p 'C:/Program Files/Watir/examples/test


_cases/report'


Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program

Files/Watir/examples/test

 _cases/report',:html)




-Charley

On 2/5/07, steven [EMAIL PROTECTED] wrote:


I have a bunch of test cases in separate .rb files.  For this example,
a.rb and b.rb.

I then created an rb file to run all of them, called suite_my_tests.rb

In this file I have:

require 'includes'

require 'a'
require 'b'

class TS_MyTests

def setup
#CBrowser.openMyBrowser()
end

def teardown
#CBrowser.closeMyBrowser()
Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program
Files/Watir/examples/test_cases/report',:html)
end

def self.suite
#Test::Unit::UI::Console::TestRunner.new(suite).start
suite = Test::Unit::TestSuite.new(All tests)
suite  TC_a.suite
suite  TC_b.suite
#Test::Unit::UI::Console::TestRunner.new(suite).start
FileUtils.mkdir_p 'C:/Program
Files/Watir/examples/test_cases/report'
#Test::Unit::UI::Reporter.run(TS_MyTests.suite,
'C:/Program Files/Watir/examples/test_cases/report',:html)
return suite
end
end




I have two questions:

The only time this line seems to 
run:Test::Unit::UI::Reporter.run(TS_MyTests.suite,
'C:/Program Files/Watir/examples/test_cases/report',:html)

is when it is between a begin and end outside of the main class in the
file above - it won't run in the #teardown or in the def self.suite.  Am I
missing something?

Also, I have the following line commented out:

#Test::Unit::UI::Console::TestRunner.new(suite).start

Any reason why I would need it uncommented?

Thanks,
Steve
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6414messageID=18139#18139
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Question About Test Suite

2007-02-04 Thread steven
I have a bunch of test cases in separate .rb files.  For this example, a.rb and 
b.rb.

I then created an rb file to run all of them, called suite_my_tests.rb

In this file I have:

require 'includes'

require 'a'
require 'b'

class TS_MyTests

def setup
#CBrowser.openMyBrowser()
end  

def teardown
#CBrowser.closeMyBrowser()
Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program 
Files/Watir/examples/test_cases/report',:html)
end

def self.suite
#Test::Unit::UI::Console::TestRunner.new(suite).start
suite = Test::Unit::TestSuite.new(All tests)
suite  TC_a.suite
suite  TC_b.suite 
#Test::Unit::UI::Console::TestRunner.new(suite).start
FileUtils.mkdir_p 'C:/Program 
Files/Watir/examples/test_cases/report'
#Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program 
Files/Watir/examples/test_cases/report',:html)
return suite
end
end 




I have two questions:

The only time this line seems to 
run:Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program 
Files/Watir/examples/test_cases/report',:html)

is when it is between a begin and end outside of the main class in the file 
above - it won't run in the #teardown or in the def self.suite.  Am I missing 
something?

Also, I have the following line commented out:

#Test::Unit::UI::Console::TestRunner.new(suite).start

Any reason why I would need it uncommented?

Thanks,
Steve
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6414messageID=18139#18139
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-25 Thread Cain, Mark
Forgive me, but yes (I my opinion) you did.  Is this forum for a ruby
framework that is exclusively for IE?  And doesn't ALL the tests that
are written and run, run in IE?  This thread was started by a question
about how to handle duplicate element ID's on a page--a behavior allowed
in IE--and that is done by using the 1 based object index.  Wouldn't
that make almost everything--at the very least indirectly--about IE?  

And for the record IE does not rely on the ID property but the index
(ordinal position) to guarantee object uniqueness.  That would make it
by design.  Here is the quote right from MS DHTML reference for the
element property ID:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml
/reference/dhtml_reference_entry.asp 
The id should be unique throughout the scope of the current
document.   If a document contains more than one object with the
same identifier,the objects are exposed as a collection that can
be referenced only in   ordinal position.
 

--Mark

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Tuesday, October 24, 2006 7:37 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

Cain, Mark wrote:
 Excuse me but aren't we talking about IE here? 
Not that i was aware of. My understanding is that the topic at hand was 
whether the HTML generated by a web application was conformant to WC3 
standards and whether non-conformance should be considered a bug. This 
has nothing to do with IE.

If you want to start a new topic that criticizes IE, then go ahead. But 
i don't understand that to be relevant to the existing thread. Did i 
miss something in the discussion?

Bret

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-24 Thread Michael Bolton
Oh, I get it.  I should have said /yet another/ bug.  :)

---Michael B. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark
Sent: October 23, 2006 12:48 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

Excuse me but aren't we talking about IE here?  Isn't MS notorious for
spec violations? 
Here are just a few for your reading pleasure:
http://channel9.msdn.com/wiki/default.aspx/Channel9.InternetExplorerStan
dardsSupport

And there is the whole backward compatibility thing too...

BTW, I agree with you!  I wish IE was stricter with the spec.  It would
make all of our automation activities much easier.

I'm just saying... :-)

--Mark


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Bolton
Sent: Monday, October 23, 2006 8:00 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

Do I misread the HTML 4.01 spec
(http://www.w3.org/TR/html401/index/attributes.html)?  It says that ID
is a
document-wide unique ID.  The whole point of the ID tag is to have a
unique ID, is it not?  Doesn't having a non-unique ID defeat the purpose
of
having an ID altogether?

I agree that the name attribute is apparently not subject to the same
restriction, though.

---Michael B.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark
Sent: October 23, 2006 10:20 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

---Michael B. wrote:

Congratulations:  you've found a bug.  There should not be two text
fields
with the same ID and the same name on the same page.  

It is not a bug because internally index is used to make all page
objects unique. It may be poor design and/or lazy programming--I'll give
you that! ;-P

--Mark


Ask the developers to
fix the bug.  If you get pushback, tell them (or the project manager)
that
the page as current constructed interferes with testability.  If you get
pushback, then use (:index, [some number]) to locate the appropriate
element.



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-24 Thread Michael Bolton
Just to be clear, there are two oracles by which I would consider this a
bug.  The non-comformance with the World Wide Web Consortium's spec is
actually the lesser of them, because the W3C is not really a stakeholder;
they don't have any skin in the game.

The fact that the duplicated ID attribute renders the product harder to test
using automation is by far the more important oracle, in that it's a real
problem for someone who does have skin the in game--the tester, and thus the
rest of the project community.  If a tester has to do extra work to address
this issue, less testing will get done overall, and that's a threat to the
value of the product.

---Michael B.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: October 24, 2006 10:37 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

Cain, Mark wrote:
 Excuse me but aren't we talking about IE here? 
Not that i was aware of. My understanding is that the topic at hand was 
whether the HTML generated by a web application was conformant to WC3 
standards and whether non-conformance should be considered a bug. This 
has nothing to do with IE.

If you want to start a new topic that criticizes IE, then go ahead. But 
i don't understand that to be relevant to the existing thread. Did i 
miss something in the discussion?

Bret

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question from a newbie

2006-10-23 Thread aidy lewis
MB writes:

 Congratulations:  you've found a bug.  There should not be two text fields
 with the same ID and the same name on the same page.

Not necessarily so; if for example, you look at IBM Portal application
architecture, it contains many separate applications (portlets) within
a container application (portal), and it is feasible that one page can
have  1 object of the same name. I think your argument may have been
valid for older architectures.

aidy
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-23 Thread Michael Bolton
Do I misread the HTML 4.01 spec
(http://www.w3.org/TR/html401/index/attributes.html)?  It says that ID is a
document-wide unique ID.  The whole point of the ID tag is to have a
unique ID, is it not?  Doesn't having a non-unique ID defeat the purpose of
having an ID altogether?

I agree that the name attribute is apparently not subject to the same
restriction, though.

---Michael B.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark
Sent: October 23, 2006 10:20 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

---Michael B. wrote:

Congratulations:  you've found a bug.  There should not be two text
fields
with the same ID and the same name on the same page.  

It is not a bug because internally index is used to make all page
objects unique. It may be poor design and/or lazy programming--I'll give
you that! ;-P

--Mark


Ask the developers to
fix the bug.  If you get pushback, tell them (or the project manager)
that
the page as current constructed interferes with testability.  If you get
pushback, then use (:index, [some number]) to locate the appropriate
element.



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-23 Thread Cain, Mark
Excuse me but aren't we talking about IE here?  Isn't MS notorious for
spec violations? 
Here are just a few for your reading pleasure:
http://channel9.msdn.com/wiki/default.aspx/Channel9.InternetExplorerStan
dardsSupport

And there is the whole backward compatibility thing too...

BTW, I agree with you!  I wish IE was stricter with the spec.  It would
make all of our automation activities much easier.

I'm just saying... :-)

--Mark


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Bolton
Sent: Monday, October 23, 2006 8:00 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

Do I misread the HTML 4.01 spec
(http://www.w3.org/TR/html401/index/attributes.html)?  It says that ID
is a
document-wide unique ID.  The whole point of the ID tag is to have a
unique ID, is it not?  Doesn't having a non-unique ID defeat the purpose
of
having an ID altogether?

I agree that the name attribute is apparently not subject to the same
restriction, though.

---Michael B.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark
Sent: October 23, 2006 10:20 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question from a newbie

---Michael B. wrote:

Congratulations:  you've found a bug.  There should not be two text
fields
with the same ID and the same name on the same page.  

It is not a bug because internally index is used to make all page
objects unique. It may be poor design and/or lazy programming--I'll give
you that! ;-P

--Mark


Ask the developers to
fix the bug.  If you get pushback, tell them (or the project manager)
that
the page as current constructed interferes with testability.  If you get
pushback, then use (:index, [some number]) to locate the appropriate
element.



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-23 Thread Lonny Eachus





While I would question the use of the term "bug", it is certainly not
proper HTML. According to the W3C specification, the id field of an
element must be unique for the entire document. While multiple elements
can have the same name, in order for your page to be valid no two
elements -- even of different types -- may have the same id.

Lonny Eachus



  

  

Subject:
    
[Wtr-general] Question from a newbie
  
  

From: 
"aidy lewis" [EMAIL PROTECTED]
  
  

Date: 
Mon, 23 Oct 2006 13:25:23 +0100
  

  
  
MB writes: 
  
  Congratulations: you've found a bug. There
should not be two text fields 
with the same ID and the same name on the same page. 
  
  
Not necessarily so; if for example, you look at IBM Portal application 
architecture, it contains many separate applications (portlets) within 
a container application (portal), and it is feasible that one page can 
have  1 object of the same name. I think your argument may have
been 
valid for older architectures. 
  
aidy 





___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question from a newbie

2006-10-20 Thread aidy rutter

Bret wrote: To clarify: it is not yet implemented for input elements (INPUT),
 such as text_field. It is supported for most other elements.I will add this caveat to the watir FAQ, and if I have some time next week, I will add this to the code with tests.

 aidy



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question from a newbie

2006-10-20 Thread Michael Bolton
I just downloaded Watir to help automate some tests. I've found it pretty 
intuitive and easy to learn but I'm having trouble getting it to fill out a 
text field on a form. The problem is that there are two text fields with the

same id and same name (all other attributes are equal as well).

Congratulations:  you've found a bug.  There should not be two text fields
with the same ID and the same name on the same page.  Ask the developers to
fix the bug.  If you get pushback, tell them (or the project manager) that
the page as current constructed interferes with testability.  If you get
pushback, then use (:index, [some number]) to locate the appropriate
element.

---Michael B.


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-19 Thread aidy rutter
Hi,

I added to this to the FAQ, but I downloaded a dev version of Watir. I
don't know what version I downloaded, because I left work a couple of
weeks ago. But I have had this working.

aidy



On 10/18/06, Bret Pettichord [EMAIL PROTECTED] wrote:
 Justin Nowell wrote:
  ie.text_field(:name = username,:index = 2).set(newuser)
 

 This syntax is not yet implemented in Watir 1.5.
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question from a newbie

2006-10-19 Thread Bret Pettichord

 ie.text_field(:name = username,:index = 2).set(newuser)
  
 

 This syntax is not yet implemented in Watir 1.5.
   
To clarify: it is not yet implemented for input elements (INPUT), 
such as text_field. It is supported for most other elements.

Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question from a newbie

2006-10-18 Thread Justin Nowell
Hey,

I just downloaded Watir to help automate some tests. I've found it pretty 
intuitive and easy to learn but I'm having trouble getting it to fill out a 
text field on a form. The problem is that there are two text fields with the 
same id and same name (all other attributes are equal as well). My script 
contained the following line of code:

ie.text_field(:name, username).set(newuser)

When I did this, it would fill in the first text field with the value 
'newuser', but what I need is to have the second one filled in. I browsed 
through your FAQ, and saw your stated workaround for this, so I switched the 
line of code to:

ie.text_field(:name = username,:index = 2).set(newuser)

When I run this script, I get the following run-time error: Unable to 
locate object, using nameusernameindex2 and 
(Watir::Exception::UnknownObjectException).

Is there something obvious I'm missing?

If it helps, this is the tag from the HTML source for both text fields:


input name=username id=username type=text size=20 maxlength=24 
value=

Any help would be greatly appreciated. Thanks.

-Justin




___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about Test::Unit and logging

2006-09-09 Thread Charley Baker
Take a look at Test Report. It will give you html or xml output for your suites: http://rubyforge.org/projects/test-report/I'll add this to the FAQ soon.
-CharleyOn 9/8/06, John Fitisoff [EMAIL PROTECTED] wrote:
Is there any way of creating a single log filecontainingthe output for an entire test suite? I seethe logger example but it's generating files for eachindividual test.__
Do You Yahoo!?Tired of spam?Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com___Wtr-general mailing list
Wtr-general@rubyforge.orghttp://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Question about Test::Unit and logging

2006-09-08 Thread John Fitisoff
Is there any way of creating a single log file
containing  the output for an entire test suite? I see
the logger example but it's generating files for each
individual test.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question - How to use different installed versions of WATiR

2006-08-31 Thread Boyt, Darrel



Bret, et 
al,

I'm still a neophyte 
where Ruby's concerned, so please excuse what may seem to be an obvious 
question.

I've followed 
theinstructions on http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgemto 
install the latest from SVN. At the end of the instructions it says I can 
uninstall previous versions of WATiR I've installed via gem by using the "gem 
uninstall watir" command. So my question is:Howdo I use 
a previous version? Do I somehow specify the versionon 
the"require" command?

Just 
curious...

Thanks,

Darrel BoytSystems 
AnalystGeneral Dynamics Information Technology 2770 Gunter Park Drive 
East, Suite H
Montgomery, Alabama 36109-1412(334) 
260-3331 direct (334) 277-2331 fax [EMAIL PROTECTED]www.gdit.com

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question - How to use different installed versions of WATiR

2006-08-31 Thread Charley Baker
You can use something along these lines to load a specifc version of a gem, standard operators apply (=, =, etc): require 'rubygems'require_gem 'watir', '= 1.5.1.1079'There's no need to uninstall previous gems if you want to use them.
-CharleyOn 8/31/06, Boyt, Darrel [EMAIL PROTECTED] wrote:





Bret, et 
al,

I'm still a neophyte 
where Ruby's concerned, so please excuse what may seem to be an obvious 
question.

I've followed 
theinstructions on http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgemto 
install the latest from SVN. At the end of the instructions it says I can 
uninstall previous versions of WATiR I've installed via gem by using the gem 
uninstall watir command. So my question is:Howdo I use 
a previous version? Do I somehow specify the versionon 
therequire command?

Just 
curious...

Thanks,

Darrel BoytSystems 
AnalystGeneral Dynamics Information Technology 2770 Gunter Park Drive 
East, Suite H
Montgomery, Alabama 36109-1412(334) 
260-3331 direct (334) 277-2331 fax [EMAIL PROTECTED]
www.gdit.com


___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Finding a Link with 2 regular expressions?

2006-07-06 Thread Rodrigo Julian Martin








Hello Everybody! 



Im trying to find a link with Watir by using 2
regular expressions.. is this posible?



Lets suppose Im trying to find a link with
this url: 



http://server.com/jm/sell?act=formsubAct=modifsiteID=MLAitemID=22245975



And Ive defined two RegExp:



RegExp1 = subAct=modif

RegExp2 = 22245975



Ive tried something like..



If browser.link(:url, /#{regExp1}#{regExp2}/).exists? ==
true then

[]



But this doesnt work.. I suppose I need something
like / #{regExp1} | #{regExp2} / (but instead of doing an OR, something that
works like an AND of regexps).



Hope you understand my bad english

Any help would be really appreciated



Thanks in advance

Rodrigo Julian Martin.

 






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Finding a Link with 2 regular expressions?

2006-07-06 Thread Ravishankar, MG




If 
browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? == true 
then

[]

should 
work!

-MG





http://server.com/jm/sell?act=formsubAct=modifsiteID=MLAitemID=22245975

And Ive defined two 
RegExp:

RegExp1 = 
subAct=modif
RegExp2 = 
22245975

Ive tried something 
like..

If browser.link(:url, 
/#{regExp1}#{regExp2}/).exists? == true then
[]

But this doesnt work.. I suppose I 
need something like / #{regExp1} | #{regExp2} / (but instead of doing an OR, 
something that works like an AND of regexps).


This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Finding a Link with 2 regularexpressions?

2006-07-06 Thread Rodrigo Julian Martin








Thanks Ravi,
it worked! But Im having another problem right now the RegExp1
and RegExp2 could appear in any order in the links I guess the sentence
you sent me only works if regExp1 ocurrence is Before regExp2 right?











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ravishankar, MG
Sent: Jueves, 06 de Julio de 2006
11:56 a.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] Finding a Link with 2 regularexpressions?







If browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? ==
true then



[]





should work!



-MG
















___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Finding a Link with 2 regularexpressions?

2006-07-06 Thread Daniel Browne
What about somehting like:

if (browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? ||
browser.link(:url, /#{regExp2}.*#{regExp1}/).exists?)
...
end

Cheers,
Daniel.

On 06/07/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:




 Thanks Ravi, it worked! But I'm having another problem right now… the
 RegExp1 and RegExp2 could appear in any order in the links… I guess the
 sentence you sent me only works if regExp1 ocurrence is Before regExp2
 right?



  


 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Ravishankar, MG
  Sent: Jueves, 06 de Julio de 2006 11:56 a.m.
  To: wtr-general@rubyforge.org
  Subject: Re: [Wtr-general] [question] Finding a Link with 2
 regularexpressions?






 If browser.link(:url, /#{regExp1}.*#{regExp2}/).exists? ==
 true then


 […]



 should work!



 -MG


  




 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-07 Thread Rodrigo Julian Martin








Hello Bret, ie.down_load_time is a Watir
1.5 feature, right?



Im afraid I still have to use the
1.4.1 release (because of WET compatibility for example). Is there a way I
could manage this with 1.4.1?





My code is like this:



[code]

$browser.links.each do |link|

 all_links[i]=link.href

 i+=1

end



i=0

puts (Links: #{all_links.length})

gets



all_links.each do |test|

 

 if
$browser.link(:url,#{test}).exists? == true 

 $browser.link(:url,#{test}).click

 $browser.wait

 else


puts(Link #{i}: #{test} --- Not Found!)

 end

 i+=1

end

[/code]





Well, I need a way of check that each link
that was clicked have loaded completely a page, else I need to
report which link fails.

So, I first think of setting a timeout to
the wait, something like if after 10 seconds the wait state is still
there, lets suppose the page 

hasnt loaded.



1) Bret, could I manage this with an assert sentence in 1.4.1?

2) Can I catch html messages like 200 OK after clicking
a link?

3) Can I manage html load errors like 404 File Not Found?





Thats it, I would really appreciate
any help

Thanks in Advance!



Rodrigo Julian Martin 

















 If all you want to do is
verify how long it took to load a page, you can do this:


ie.link(:name, foo).click
 assert(
ie.down_load_time  10)

 I have actually
been thinking of adding a timeout to the wait method, but i'm not sure your
situation really needs it. 

 Bret

 P.S. I have my
doubts about McMahon's suggestion. 










___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-07 Thread Daniel Browne
If you knew of some text that was always present in the html of a
loaded page, but not present when one of the error pages is displayed
you could use:

ie.html.match(/some_text_that_is_always_present/)

I imagine there is a better way to do it though.

Cheers,
Daniel.





On 07/06/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:




 Hello Bret, ie.down_load_time is a Watir 1.5 feature, right?



 I'm afraid I still have to use the 1.4.1 release (because of WET
 compatibility for example). Is there a way I could manage this with 1.4.1?





 My code is like this:



 [code]

 $browser.links.each do |link|

all_links[i]=link.href

i+=1

 end



 i=0

 puts (Links: #{all_links.length})

 gets



 all_links.each do |test|



if $browser.link(:url,#{test}).exists? == true

  $browser.link(:url,#{test}).click

  $browser.wait

else

puts(Link #{i}: #{test} --- Not Found!)

end

i+=1

 end

 [/code]





 Well, I need a way of check that each link that was clicked have loaded
 completely a page, else I need to report which link fails.

 So, I first think of setting a timeout to the wait, something like if after
 10 seconds the wait state is still there, let's suppose the page

 hasn't loaded.



 1)   Bret, could I manage this with an assert sentence in 1.4.1?

 2)   Can I catch html messages like 200 OK after clicking a link?

 3)   Can I manage html load errors like 404 File Not Found?





 That's it, I would really appreciate any help…

 Thanks in Advance!



 Rodrigo Julian Martin



  




  If all you want to do is verify how long it took to load a page, you can
 do this:

ie.link(:name, foo).click
assert( ie.down_load_time  10)

   I have actually been thinking of adding a timeout to the wait method, but
 i'm not sure your situation really needs it.

   Bret

   P.S. I have my doubts about McMahon's suggestion.
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-07 Thread Bret Pettichord
On 6/7/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:














Hello Bret, ie.down_load_time is a Watir
1.5 feature, right?No. It's been in Watir for a long time. It is in 1.4.1.
Well, I need a way of check that each link
that was clicked have loaded "completely" a page, else I need to
report which link fails.

So, I first think of setting a timeout to
the wait, something like "if after 10 seconds the wait state is still
there, let's suppose the page 

hasn't loaded".



1) 
Bret, could I manage this with an assert sentence in 1.4.1?
No. You would need to write multi-threaded code to do this.
2)
 Can I catch html messages like "200 OK" after clicking
a link?
3) 
Can I manage html load errors like 404 File Not Found?
You might try experimenting with ie.add_checker -- look at Navigation Checker in watir.rb. (Also in 1.4.1)
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-02 Thread Praveen Kumar Kammitta
If you are looking to gather performance information, you might find
the following article useful. Hope this helps.

http://www.informit.com/articles/printerfriendly.asp?p=370634rl=1



On 6/1/06, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Send Wtr-general mailing list submissions to
   wtr-general@rubyforge.org

 To subscribe or unsubscribe via the World Wide Web, visit
   http://rubyforge.org/mailman/listinfo/wtr-general
 or, via email, send a message with subject or body 'help' to
   [EMAIL PROTECTED]

 You can reach the person managing the list at
   [EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Wtr-general digest...


 Today's Topics:

1. Re: [question] Setting timeout for a ie.wait method?
   (Rodrigo Julian Martin)
2. Re: Methods that can be used within a frame? (David Schmidt)
3. Re: Determine HTML property (David Schmidt)
4. Re: Methods that can be used within a frame? (Tyler Prete)
5. Re: Methods that can be used within a frame? (Bret Pettichord)
6. Re: How to create a script for calendar function? (Attebery, Bill)


 --

 Message: 1
 Date: Thu, 1 Jun 2006 17:22:41 -0300
 From: Rodrigo Julian Martin [EMAIL PROTECTED]
 Subject: Re: [Wtr-general] [question] Setting timeout for a ie.wait
   method?
 To: wtr-general@rubyforge.org
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain; charset=us-ascii

 Thanks for all your replies...



 The Chris McMahon answer doesn't fit exactly with what I'm trying to do,
 but maybe is a good approach...



 Bret, with the assert sentence, can I say something like... If assert
 fails, do some code?



 John, I can't understand your code, I guess I'm too newbie to OO
 programming...Are you waiting always for 30 seconds? Could this be
 parametrized too?



 Thanks again to all of you!





 

 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
 Sent: Jueves, 01 de Junio de 2006 03:50 p.m.
 To: wtr-general@rubyforge.org
 Subject: Re: [Wtr-general] [question] Setting timeout for a ie.wait
 method?



 The problem is that link().click won't return until the page is loaded.
 Maybe you meant to use link().ole_object.click instead?

 Bret

 On 6/1/06, Chris McMahon [EMAIL PROTECTED] wrote:

  P.S. I have my doubts about McMahon's suggestion.

 :)
 I'm doing something very similar to this in my current Watir scripts
 right now, except I haven't put in the max-retries logic yet.
 -Chris
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general



 -- next part --
 An HTML attachment was scrubbed...
 URL:
 http://rubyforge.org/pipermail/wtr-general/attachments/20060601/9c2bd723/attachment-0001.htm

 --

 Message: 2
 Date: Thu, 01 Jun 2006 13:23:04 -0700
 From: David Schmidt [EMAIL PROTECTED]
 Subject: Re: [Wtr-general] Methods that can be used within a frame?
 To: wtr-general@rubyforge.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 Tyler,

 What I've done in the past is to create a new method, Element#html=
 which allows you to replace the outerHTML for any element:

 class Watir::Element
   def html=(new_html)
   assert_exists
   @o.outerHTML = new_html
   end
 end

 Unfortunately, when playing with your top level document that contains
 the frameset there wasn't any Watir::Element I could grab.  I tried
 doing it manually by taking different document elements on that top page
 and trying to do the change like:

 ie.document.body.outerhtml = BODYtest/BODY

 Even though e.document.body.ole_put_methods shows that we should be able
 to do this (an outerHTML put call exists) when tried I got the following
 error:

 irb(main):029:0 ie.document.body.outerhtml = BODYtest/BODY
 WIN32OLERuntimeError:
 OLE error code:800A0258 in htmlfile
   No Description
 HRESULT error code:0x80020009
   Exception occurred.
 from (irb):29:in `method_missing'
 from (irb):29

 So in Tyler's case, I was unable to find a way to change the frame
 element in his top HTML.  However, I often use this replacement
 technique to prevent popups by changing the HTML attributes like this:

 ie.text_field(:id, 'xxx').html = ie.text_field(:id, 'xxx').html.sub(/
 onclick=\S+/, '')

 which clears out the onclick=... from the element.

 David

 Bret Pettichord wrote:
  On 6/1/06, *Tyler Prete* [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  Well I may not even have to deal with it anymore, but how would I
  change this manually?  I do not have control over the HTML in the
  page, I am only interacting with it via Watir.
 
 
  By design, Watir is a tool for automating things that you can do
  manually. If you don't

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Chris McMahon
  I'm doing this because I need to test if a page has been loaded correctly
 after clicking a link, maybe there's a easier form of checking this..

def wait_for_page(seconds)
begin
   @ie.link(:text,My Incredibly Important Link).click
   do_the_next_thing_method
   rescue
   sleep 1
   seconds = seconds + 1
  if seconds == 10
 puts waited over 10 seconds for Incredibly Important Link,
tried 10 times, exiting
 exit
   end
   wait_for_page(seconds) #CALL THE SAME METHOD AGAIN
 end

I haven't tested it but it should be OK.
-Chris
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Bret Pettichord
On 6/1/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:











I was wondering if there's a way of setting the
timeout parameter for the .wait method… I mean, let's say that a
page doesn't load in 10 seconds. Could I trap that the .wait method
failed after 10 seconds in order to log that?
I'm doing this because I need to test if a page
has been loaded correctly after clicking a link, maybe there's a easier
form of checking this..If all you want to do is verify how long it took to load a page, you can do this: ie.link(:name, foo).click assert(
ie.down_load_time  10)I have actually been thinking of adding a timeout to the wait method, but i'm not sure your situation really needs it. BretP.S. I have my doubts about McMahon's suggestion.

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Chris McMahon
 P.S. I have my doubts about McMahon's suggestion.

:)
I'm doing something very similar to this in my current Watir scripts
right now, except I haven't put in the max-retries logic yet.
-Chris
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Bret Pettichord
The problem is that link().click won't return until the page is loaded. Maybe you meant to use link().ole_object.click instead?BretOn 6/1/06, Chris McMahon
 [EMAIL PROTECTED] wrote:
 P.S. I have my doubts about McMahon's suggestion.:)I'm doing something very similar to this in my current Watir scriptsright now, except I haven't put in the max-retries logic yet.-Chris___
Wtr-general mailing listWtr-general@rubyforge.orghttp://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Chris McMahon
On 6/1/06, Bret Pettichord [EMAIL PROTECTED] wrote:
 The problem is that link().click won't return until the page is loaded.
 Maybe you meant to use link().ole_object.click instead?


Ah, you're right, I misunderstood the original question.

Rodrigo, in my case, I have interim pages that show messages to the
user before the page I need to manipulate arrives.  Also, I have pages
that have frames, and the frames take longer to load than the outer
page does.

So I've written these little looping checkers that don't do the next
action until the right part of the page is in place.  If that's your
issue, then my code will work well for you.

If you have simple pages that just don't load, then another approach
is in order.
-Chris
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread John Castellucci








I had a similar requirement and addressed
it by adding my methods to the Element class.
This may not be the best solution, but it worked for me.



module Watir 

class Element

 def click_wait(how_long
= 30)

 wait_for(how_long)

 click

 end



 def wait_for(how_long=30)

 0.upto(how_long-1) do |n|

 if exists? 

 if enabled?

 puts Waited #{n} sec for #{self.class}(:[EMAIL PROTECTED],
[EMAIL PROTECTED]) if n  0

  return

 end

 end

 sleep 1

 end

 raise
(#{self.class}(:[EMAIL PROTECTED], [EMAIL PROTECTED]) not found
after #{how_long} sec) if ! exists?

 raise (#{self.class}(:[EMAIL PROTECTED],
[EMAIL PROTECTED]) not enabled after #{how_long} sec)

 end

 end

end






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Setting timeout for a ie.wait method?

2006-06-01 Thread Rodrigo Julian Martin








Thanks for all your replies



The Chris McMahon answer doesnt fit
exactly with what Im trying to do, but maybe is a good approach



Bret, with the assert sentence, can I say
something like If assert fails, do some code?



John, I cant understand your code,
I guess Im too newbie to OO programmingAre you waiting always for
30 seconds? Could this be parametrized too?



Thanks again to all of you!













From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Jueves, 01 de Junio de 2006
03:50 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] Setting timeout for a ie.wait method?





The problem is that
link().click won't return until the page is loaded. Maybe you meant to use
link().ole_object.click instead?

Bret



On 6/1/06, Chris
McMahon [EMAIL PROTECTED]
wrote:

 P.S. I have my doubts about McMahon's suggestion.

:)
I'm doing something very similar to this in my current Watir scripts
right now, except I haven't put in the max-retries logic yet.
-Chris
___ 
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general











___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Accesing images?

2006-05-26 Thread Rodrigo Julian Martin








Hi Brett, thanks for the info 

I will try with Watir 1.5.. one question,
all the scripts Ive wrote with 1.41 will run in 1.5?



Another question I realized that
what I really need to click is not an image, but this:



div align=center
style=margin-bottom:10px;a
href="" id=quitar6
style=visibility:hiddenQuitar/a/div/tdtd
width=20/td

div id=DIVImageFile_1
name=DIVImageFile_1 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen1
id=frmImagen1 action=""
method=post encType=multipart/form-data target=responseFrame

div style=filter:
alpha(opacity=0); width: 83px; height: 86px;

input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile1 name=as_image_file value=
>

input type=hidden
id=FILEProductImageTmp_1 name=FILEProductImageTmp_1
value=

INPUT TYPE=hidden
NAME=as_site_id VALUE=MLA

!--INPUT TYPE=hidden
NAME=as_vsite_id VALUE=MLA--

INPUT TYPE=hidden
NAME=as_item_id VALUE=21609120

INPUT TYPE=hidden
NAME=as_image_path VALUE=052006/

/div



Am I able to access the input type file
with id newFile1 in order to click it with a click_no_wait? (because
this triggers a Modal Popup)





Thanks in Advance! 





Rodrigo Julian Martin























From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Martes, 23 de Mayo de 2006
07:23 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] Accesing images?





On 5/23/06, Rodrigo Julian Martin
[EMAIL PROTECTED]
wrote:











Hi Bret, sorry for the lack of info.. I'm using 1.4.1











Just as a point of information, we did not support *modal* web dialogs
in 1.4.1. So i initially thought you must be using a more current version. It
sounds like you are actually using a *popup* web dialog. The terms for these
things are confusing, but a modal dialog is a dialog that blocks access to the
main page when it is active. (all modals are popups, but some popups are
non-modal). 

The error message you are reporting clearly represents a bug in Watir. Object
nesting (e.g. accessing an image in a div) was also new back then, and has been
much improved since. I suspect that is the reason for the error. 

I suggest that you try this out with a 1.5 build.

Bret










___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Accesing images?

2006-05-23 Thread Rodrigo Julian Martin








Thanks for the answer Lonny, and sorry for
that untidy HTML! Ill download TidyUI



Im trying to click the image with
this:



$browser_popup.frame(:name,responseFrame).div(:id,
DIVImageFile_2).image(:id, img2).click



And the output shows:



c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:856:in
`getImage': undefined local variable or method `document' for
#Watir::Div:0x558 (NameError)

 from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2690:in `initialize'

 from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `new'

 from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `image'

 from
subir_fotos:27





Or directly with this sentence

$browser_popup.image(:id,img2).click



That sentence doesnt throw any
error, but it doesnt click the image as the popup that should appear
doesnt.



Any help would be really appreciated.. 

Thanks in Advance!



Rodrigo Julian Martin













From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Lonny Eachus
Sent: Lunes, 22 de Mayo de 2006
08:11 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] Accesing images?






We can see a lot easier what is going on if you indent the HTML. Try using
TidyUI or some such, freely available for download.

Anyway, now that I have tidied the HTML, I can see that each image has an
associated ID attribute. It would help if you told us HOW you were trying to
click them. Are you using the id?

Example:

 @my_ie.image(:id, 'img2').click



Lonny Eachus
==






 
  
  
  Subject: 
  
  Re: [Wtr-general] [question] Accesing images?
  
 
 
  
  
  From: 
  
  Rodrigo Julian Martin [EMAIL PROTECTED]
  
 
 
  
  
  Date: 
  
  Mon, 22 May 2006 16:13:54 -0300
  
 
 
  
  
  To: 
  
  wtr-general@rubyforge.org
  
 





 
  
  
  To: 
  
  wtr-general@rubyforge.org
  
 




Hello! 



Im having troubles trying to click some images
on a modal web dialog.

They seem to be under div tags, but I cant
click them



Ive tried with divs, images and frame
sentences but nothing works 



Here is the html code for that section (Ive
discarded the java functions on the beginning of the html file)



snip








___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Accesing images?

2006-05-23 Thread Lonny Eachus





Bret and David Schmidt are currently working on accessing popups with
frames. As far as I know, not everything is working at this time. This
should improve as their code gets debugged and included in a future
release. I have seen the issues David has had to wade through to access
elements in frames on some popups, and it is not a simple thing at all.

Lonny Eachus
==



  

  

Subject:

Re: [Wtr-general] [question] Accesing images?
  
  

From: 
"Rodrigo Julian Martin" [EMAIL PROTECTED]
  
  

Date: 
Tue, 23 May 2006 10:36:27 -0300
  
  

To: 
wtr-general@rubyforge.org
  

  
  

  

To: 
wtr-general@rubyforge.org
  

  
  
  
  


  
  
  
  Thanks for
the answer Lonny, and sorry for
that untidy HTML! Ill download TidyUI
  
  Im trying
to click the image with
this:
  
  $browser_popup.frame(:name,"responseFrame").div(:id,
"DIVImageFile_2").image(:id, "img2").click
  
  And the
output shows:
  
  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:856:in
`getImage': undefined local variable or method `document' for
#Watir::Div:0x558 (NameError)
  
from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2690:in `initialize'
  
from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `new'
  
from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `image'
  
from
subir_fotos:27
  
  
  Or directly
with this sentence
  $browser_popup.image(:id,"img2").click
  
  That
sentence doesnt throw any
error, but it doesnt click the image as the popup that should appear
doesnt.
  
  Any help
would be really appreciated.. 
  Thanks in
Advance!
  
  Rodrigo
Julian Martin
  
  



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Accesing images?

2006-05-23 Thread David Schmidt
Rodrigo,

Examining the HTML I see that the image with id of img2 isn't even in 
the div with id DIVImageFile_2. In addition, the img2 image doesn't 
have any events associated with it, so clicking that image won't do 
anything.

I think the link you wish to follow is the link following img2:

a href=javascript:quitar(2) id=quitar2 
style=visibility:hiddenQuitar/a

Try:

$browser_popup.frame('responseFrame').link(:id, 'quitar2').click

to click the link following the img2 image.

David Schmidt
[EMAIL PROTECTED]

Rodrigo Julian Martin wrote:

 Thanks for the answer Lonny, and sorry for that untidy HTML! I’ll 
 download TidyUI…

 I’m trying to click the image with this:

 $browser_popup.frame(:name,responseFrame).div(:id, 
 DIVImageFile_2).image(:id, img2).click

 And the output shows:

 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:856:in `getImage': undefined 
 local variable or method `document' for #Watir::Div:0x558 
 (NameError)

 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2690:in `initialize'

 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `new'

 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:608:in `image'

 from subir_fotos:27

 Or directly with this sentence…

 $browser_popup.image(:id,img2).click

 That sentence doesn’t throw any error, but it doesn’t click the image 
 as the popup that should appear doesn’t….

 Any help would be really appreciated..

 Thanks in Advance!

 Rodrigo Julian Martin



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] [question] Javascript security alert popup?

2006-05-23 Thread Gavazn Vahshi
Hello everyone,

What's the best approach to deal with javascript
security alert popups? Is autoit a good choice?

I get the popup when I try http://mysite and the link
is forwarded to https://mysite waiting for user
confirmation.

I'm kind of new to this, but I did go through a few
months of threads and was not able to find a solution
in autoit.

Thanks,
  -G

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Javascript security alert popup?

2006-05-23 Thread Lillis, Dara
The code below worked for me when I needed to deal with that.

Another option (potentially, depending on your setup) is to install the
ssl certificate for the secure site.

To do that, manually navigate to https://mysite and when you get the
security popup, click view certificate and follow the steps to install
the certificate. Future visits to the secure site should not then prompt
you with the security popup. You would need to install the certificate
for each client machine that runs your tests.

here's the code:

require 'watir/WindowHelper'

require 'watir'
include Watir

  ie = IE.new

  a = Thread.new {
ie.goto(https://mysite)
 }
  b = Thread.new {
helper = WindowHelper.new
helper.push_security_alert_yes
  }
  a.join
  b.join


  
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gavazn Vahshi
Sent: Tuesday, May 23, 2006 1:32 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] [question] Javascript security alert popup?

Hello everyone,

What's the best approach to deal with javascript security alert popups?
Is autoit a good choice?

I get the popup when I try http://mysite and the link is forwarded to
https://mysite waiting for user confirmation.

I'm kind of new to this, but I did go through a few months of threads
and was not able to find a solution in autoit.

Thanks,
  -G

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com ___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Javascript security alert popup?

2006-05-23 Thread Gavazn Vahshi
Thanks a bunch Lillis,

It worked great.  Since I'm reaching the web server on
an appliance I would rather follow your code, because
I need to run the code against multiple appliances.

Thanks again,

-G

--- Lillis, Dara [EMAIL PROTECTED] wrote:

 The code below worked for me when I needed to deal
 with that.
 
 Another option (potentially, depending on your
 setup) is to install the
 ssl certificate for the secure site.
 
 To do that, manually navigate to https://mysite and
 when you get the
 security popup, click view certificate and follow
 the steps to install
 the certificate. Future visits to the secure site
 should not then prompt
 you with the security popup. You would need to
 install the certificate
 for each client machine that runs your tests.
 
 here's the code:
 
 require 'watir/WindowHelper'
 
 require 'watir'
 include Watir
 
   ie = IE.new
 
   a = Thread.new {
 ie.goto(https://mysite)
}
   b = Thread.new {
   helper = WindowHelper.new
   helper.push_security_alert_yes
 }
 a.join
 b.join
   
 
   
  
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Gavazn Vahshi
 Sent: Tuesday, May 23, 2006 1:32 PM
 To: wtr-general@rubyforge.org
 Subject: [Wtr-general] [question] Javascript
 security alert popup?
 
 Hello everyone,
 
 What's the best approach to deal with javascript
 security alert popups?
 Is autoit a good choice?
 
 I get the popup when I try http://mysite and the
 link is forwarded to
 https://mysite waiting for user confirmation.
 
 I'm kind of new to this, but I did go through a few
 months of threads
 and was not able to find a solution in autoit.
 
 Thanks,
   -G
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around
 http://mail.yahoo.com
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general
 
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] Accesing images?

2006-05-23 Thread Bret Pettichord
It would help to know what version of Watir you are using.Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Accesing images?

2006-05-23 Thread Bret Pettichord
On 5/23/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:















Hi Bret, sorry for the lack of info.. I'm
using 1.4.1Just as a point of information, we did not support *modal* web dialogs in 1.4.1. So i initially thought you must be using a more current version. It sounds like you are actually using a *popup* web dialog. The terms for these things are confusing, but a modal dialog is a dialog that blocks access to the main page when it is active. (all modals are popups, but some popups are non-modal).
The error message you are reporting clearly represents a bug in Watir. Object nesting (e.g. accessing an image in a div) was also new back then, and has been much improved since. I suspect that is the reason for the error.
I suggest that you try this out with a 1.5 build.Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Accesing Images Snapshot

2006-05-22 Thread Rodrigo Julian Martin








And here is the snapshot of that 6 Images



Thanks!





Rodrigo Julian Martin






attachment: image_buttons.jpg
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Accesing Images..

2006-05-22 Thread Rodrigo Julian Martin








Oh, sorry.. The snapshots are supposed to go with an earlier
post Ive sent. But that post is still waiting moderation, because its
a little bigger than 40K. 



Sorry Again



Rodrigo Julian Martin








___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Accesing images?

2006-05-22 Thread Rodrigo Julian Martin








Hello! 



Im having troubles trying to click some images on a
modal web dialog.

They seem to be under div tags, but I cant click
them



Ive tried with divs, images and frame sentences but
nothing works 



Here is the html code for that section (Ive discarded
the java functions on the beginning of the html file)



[code]



table width=550 border=0
cellpadding=0 cellspacing=0

trtdtable border=0
cellpadding=0 cellspacing=0trtd
style=font-weight:bold1br

img src="" width=85
height=85 id=img1 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar1
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold2br

img src="" width=85
height=85 id=img2 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar2 style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold3br

img src="" width=85
height=85 id=img3 border=1
style=border-collapse:collapse;border-color:#99br

div align=center style=margin-bottom:10px;a
href="" id=quitar3
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold4br

img src="" width=85
height=85 id=img4 border=1 style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar4
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold5br

img src="" width=85
height=85 id=img5 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a
href="" id=quitar5
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tdtd style=font-weight:bold6br

img src="" width=85
height=85 id=img6 border=1
style=border-collapse:collapse;border-color:#99br

div align=center
style=margin-bottom:10px;a href=""
id=quitar6
style=visibility:hiddenQuitar/a/div/tdtd
width=20/tddiv id=DIVImageFile_1
name=DIVImageFile_1 style=position: absolute;filter: alpha(opacity=0);
top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen1
id=frmImagen1 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile1 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_1 name=FILEProductImageTmp_1
value=


INPUT TYPE=hidden NAME=as_site_id
VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT TYPE=hidden NAME=as_item_id
VALUE=21607561


INPUT TYPE=hidden NAME=as_image_path
VALUE=052006/

/div

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

input type=reset value=
q  
style=cursor:default; id=hiddenQuitar1

/form

/divdiv id=DIVImageFile_2
name=DIVImageFile_2 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen2
id=frmImagen2 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile2 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_2 name=FILEProductImageTmp_2
value=


INPUT TYPE=hidden NAME=as_site_id
VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT TYPE=hidden NAME=as_item_id
VALUE=21607561


INPUT TYPE=hidden NAME=as_image_path
VALUE=052006/

/div

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

input type=reset value=
q  
style=cursor:default; id=hiddenQuitar2

/form

/divdiv id=DIVImageFile_3
name=DIVImageFile_3 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen3
id=frmImagen3 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile3 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_3 name=FILEProductImageTmp_3
value=


INPUT TYPE=hidden NAME=as_site_id
VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT TYPE=hidden NAME=as_item_id
VALUE=21607561


INPUT TYPE=hidden NAME=as_image_path
VALUE=052006/

/div

nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

input type=reset value=
q  
style=cursor:default; id=hiddenQuitar3

/form

/divdiv id=DIVImageFile_4
name=DIVImageFile_4 style=position: absolute;filter:
alpha(opacity=0); top:47px; left:10px; width: 83px; height: 86px;

form name=frmImagen4
id=frmImagen4 action=""
method=post encType=multipart/form-data
target=responseFrame

div style=filter: alpha(opacity=0); width: 83px;
height: 86px;

 input type=file
style=font-size:15px; height:80px; width:50px size=1
id=newFile4 name=as_image_file
value= >

 input type=hidden
id=FILEProductImageTmp_4 name=FILEProductImageTmp_4
value=


INPUT TYPE=hidden NAME=as_site_id VALUE=MLA


!--INPUT TYPE=hidden NAME=as_vsite_id
VALUE=MLA--


INPUT 

Re: [Wtr-general] [question] Accesing images?

2006-05-22 Thread Lonny Eachus





We can see a lot easier what is going on if you indent the HTML. Try
using TidyUI or some such, freely available for download.

Anyway, now that I have tidied the HTML, I can see that each image has
an associated ID attribute. It would help if you told us HOW you were
trying to click them. Are you using the id?

Example:

 @my_ie.image(:id, 'img2').click



Lonny Eachus
==



  

  

Subject:

Re: [Wtr-general] [question] Accesing images?
  
  

From: 
"Rodrigo Julian Martin" [EMAIL PROTECTED]
  
  

Date: 
Mon, 22 May 2006 16:13:54 -0300
  
  

To: 
wtr-general@rubyforge.org
  

  
  

  

To: 
wtr-general@rubyforge.org
  

  
  
  
  
  
  
  Hello! 
  
  Im having troubles
trying to click some images on a
modal web dialog.
  They seem to be under div
tags, but I cant click
them
  
  Ive tried with divs,
images and frame sentences but
nothing works 
  
  Here is the html code for
that section (Ive discarded
the java functions on the beginning of the html file)
  
  snip
  




___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Passing a Parameter in XPATHfor FireWatir?

2006-05-18 Thread Rodrigo Julian Martin
Thanks for the aswer Brett! I'd always thought that single quotes prevented 
variable expansion too... 
 
Cheers!
Rodrigo Julian Martin

Bret Pettichord wrote:

 Why did you change the inner quotes on the second try? This should work:
 
 ie.select_list(:xpath, //[EMAIL PROTECTED]'#{variable}'])


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

winmail.dat___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Passing a Parameter in XPATHfor FireWatir?

2006-05-18 Thread Bret Pettichord
BTW, one of the conventions i follow in my ruby code is that i always use single quotes, unless i'm using interpolation or some other feature (like the ability to include single quotes) that requires double quotes.

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] How to click two buttons that are not buttons...

2006-05-18 Thread Rodrigo Julian Martin
Hello Everybody, i'm trying to click two buttons that are not regular buttons...
 
This is the code for them:
 
  tr
td
  table border=0 cellpadding=0 cellspacing=2
tbodytr width=90
  td align=center bgcolor=#110a7c nowrap=nowrap 
valign=center
div class=but onmousedown='this.className=butdwn' 
onmouseout='this.className=but' onmouseup='this.className=but'a 
href=javascript:window.document.frmAdult.submit(); class=buttxt 
onmousedown='this.className=buttxt' onmouseout='this.className=buttxt' 
onmouseup='this.className=buttxt' font color=#ffAcepto/font 
/a/div
  /td
/tr
  /tbody/table
/td
td
  table border=0 cellpadding=0 cellspacing=2
tbodytr width=90
  td align=center bgcolor=#110a7c nowrap=nowrap 
valign=center
div class=but onmousedown='this.className=butdwn' 
onmouseout='this.className=but' onmouseup='this.className=but'a 
href=http://www.mercadolibre.com.ar/; class=buttxt 
onmousedown='this.className=buttxt' onmouseout='this.className=buttxt' 
onmouseup='this.className=buttxt' No Acepto /a/div
  /td
/tr
  /tbody/table
/td
  /tr

Any help would be really appreciated!
 
Thanks in advance
Rodrigo Julian Martin

 
winmail.dat___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] How to click two buttons that are not buttons...

2006-05-18 Thread Lillis, Dara
Title: [Wtr-general] need help with radio button



here is one way:

ie.link(:text,'Acepto').click
ie.link(:text, 'No Acepto').click


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Rodrigo Julian 
MartinSent: Thursday, May 18, 2006 2:51 PMTo: 
wtr-general@rubyforge.orgSubject: [question] How to click two buttons 
that are not buttons...


Hello Everybody, i'm trying to click two buttons that are not 
regular buttons...

This is the code for them:

  tr
td
  table border="0" cellpadding="0" cellspacing="2"
tbodytr width="90"
  td align="center" bgcolor="#110a7c" nowrap="nowrap" valign="center"
div class="but" onmousedown='this.className="butdwn"' onmouseout='this.className="but"' onmouseup='this.className="but"'a href="_javascript_:window.document.frmAdult.submit();" class="buttxt" onmousedown='this.className="buttxt"' onmouseout='this.className="buttxt"' onmouseup='this.className="buttxt"' font color="#ff"Acepto/font /a/div
  /td
/tr
  /tbody/table
/td
td
  table border="0" cellpadding="0" cellspacing="2"
tbodytr width="90"
  td align="center" bgcolor="#110a7c" nowrap="nowrap" valign="center"
div class="but" onmousedown='this.className="butdwn"' onmouseout='this.className="but"' onmouseup='this.className="but"'a href="http://www.mercadolibre.com.ar/" class="buttxt" onmousedown='this.className="buttxt"' onmouseout='this.className="buttxt"' onmouseup='this.className="buttxt"' No Acepto /a/div
  /td
/tr
  /tbody/table
/td
  /tr
Any help would be really appreciated!

Thanks in advance
Rodrigo Julian Martin
CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this email in error, please notify the sender and delete this email from your system. Thank you.   
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread Rodrigo Julian Martin








Thanks Brett, I will try this code and let
you know!



I would like to add that besides that the problematic
banner is an iframe, it is from clickexperts, so it tracks info about who
clicked it And it violates this:



[ extracted from http://msdn.microsoft.com/library/default.asp?url="">
]



Since it is important to be able to
navigate windows or frames to any URL beyond the domain restriction, these
types of accesses are always permitted. Only access that attempts to read out
or modify content is restricted. For instance, the href property might be
assigned to cause navigation to occur, but this property cannot be read if the
URL is of a different domain. This would allow one page to learn where the user
has been browsing, and to allow this is a breach of the user's privacy.



And so, it throws the access denied OLE
error when trying to load the page that contains that banner The weird
thing is that here @ work it doesnt showup, but in the customer
environments yes



I will try with your suggestions Brett,
thank you so much!



Cheers

Rodrigo Julian Martin









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Lunes, 08 de Mayo de 2006
11:23 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] access denied OLE error code:80070005





This might fix your
problem depending on the actual code that failed. (Show us more of your code if
you need more help.)

 class Watir::IE
 attr_accessor error_checkers
 end
 ie.error_checkers = []

Bret



On 5/8/06, Rodrigo
Julian Martin [EMAIL PROTECTED]
wrote:





Hello everybody!











When watir does a .wait for a page, it throws me the
following error:











xecuting 'ruby -C C:/Documents and
Settings/testing/Desktop/[Desarrollo] Ensamble de Circuitos 08-05-2006
ML_Circuito.rb'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `method_missing': document
(WIN32OLERuntimeError)
 OLE error code:80070005 in Unknown
 Access is denied.





 HRESULT error code:0x80020009
 Exception occurred.from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in
`check_for_http_error'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each'
 ... 6 levels...
from ML_Circuito.rb:411:in `each'
from ML_Circuito.rb:411
from ML_Circuito.rb:404:in `open'
from ML_Circuito.rb:404
Execution completed with exit code 1.

















I guess that this happen because in the page, there is a banner
which have code of clickexperts (another domain). I can't get the work around
for this.. any help? I´ve tried adding that domain to the list of Trusted
Sites, but it didn't help.











If I missed some info, please let me know.











Cheers!





Rodrigo Julian Martín






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general










___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread Bret Pettichord
Thanks fro the reference. I've added it to the FAQhttp://wiki.openqa.org/display/WTR/FAQ#access-deniedIf my solution also works, lets also add it to the FAQ.
BretOn 5/9/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:















Thanks Brett, I will try this code and let
you know!



I would like to add that besides that the problematic
banner is an iframe, it is from clickexperts, so it tracks info about who
clicked it… And it violates this:



[ extracted from 
http://msdn.microsoft.com/library/default.asp?url="">
]



Since it is important to be able to
navigate windows or frames to any URL beyond the domain restriction, these
types of accesses are always permitted. Only access that attempts to read out
or modify content is restricted. For instance, the href property might be
assigned to cause navigation to occur, but this property cannot be read if the
URL is of a different domain. This would allow one page to learn where the user
has been browsing, and to allow this is a breach of the user's privacy.



And so, it throws the access denied OLE
error when trying to load the page that contains that banner… The weird
thing is that here @ work it doesn't showup, but in the customer
environments yes…



I will try with your suggestions Brett,
thank you so much!



Cheers

Rodrigo Julian Martin









From:
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On Behalf Of Bret Pettichord
Sent: Lunes, 08 de Mayo de 2006
11:23 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] access denied OLE error code:80070005





This might fix your
problem depending on the actual code that failed. (Show us more of your code if
you need more help.)

 class Watir::IE
 attr_accessor error_checkers
 end
 ie.error_checkers = []

Bret



On 5/8/06, Rodrigo
Julian Martin [EMAIL PROTECTED]
wrote:





Hello everybody!











When watir does a .wait for a page, it throws me the
following error:











xecuting 'ruby -C C:/Documents and
Settings/testing/Desktop/[Desarrollo] Ensamble de Circuitos 08-05-2006
ML_Circuito.rb'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `method_missing': document
(WIN32OLERuntimeError)
 OLE error code:80070005 in Unknown
 Access is denied.





 HRESULT error code:0x80020009
 Exception occurred.from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in
`check_for_http_error'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each'
 ... 6 levels...
from ML_Circuito.rb:411:in `each'
from ML_Circuito.rb:411
from ML_Circuito.rb:404:in `open'
from ML_Circuito.rb:404
Execution completed with exit code 1.

















I guess that this happen because in the page, there is a banner
which have code of clickexperts (another domain). I can't get the work around
for this.. any help? I´ve tried adding that domain to the list of Trusted
Sites, but it didn't help.











If I missed some info, please let me know.











Cheers!





Rodrigo Julian Martín






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general











___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread Rodrigo Julian Martin









Great! Youre welcome, thanks to you for
the help..



One question Brett.. where should I put
that code? On my script source or in Watir.rb?



Thanks in Advance

Rodrigo Julian Martin











From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Bret Pettichord
Sent: Martes, 09 de Mayo de 2006
11:58 a.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] access denied OLE error code:80070005





Thanks fro the reference.
I've added it to the FAQ
http://wiki.openqa.org/display/WTR/FAQ#access-denied

If my solution also works, lets also add it to the FAQ. 

Bret



On 5/9/06, Rodrigo
Julian Martin [EMAIL PROTECTED]
wrote:





Thanks Brett, I will try this code and let you know!



I would like to add that besides that the problematic banner
is an iframe, it is from clickexperts, so it tracks info about who clicked it
And it violates this:



[ extracted from http://msdn.microsoft.com/library/default.asp?url="">
]



Since it is important to be able to navigate windows or
frames to any URL beyond the domain restriction, these types of accesses are
always permitted. Only access that attempts to read out or modify content is
restricted. For instance, the href property might be assigned to cause
navigation to occur, but this property cannot be read if the URL is of a
different domain. This would allow one page to learn where the user has been
browsing, and to allow this is a breach of the user's privacy.



And so, it throws the access denied OLE error when trying to
load the page that contains that banner The weird thing is that here @ work it
doesn't showup, but in the customer environments yes



I will try with your suggestions Brett, thank you so much!



Cheers

Rodrigo Julian Martin









From: [EMAIL PROTECTED]
[mailto:
[EMAIL PROTECTED]] On
Behalf Of Bret Pettichord
Sent: Lunes, 08 de Mayo de 2006
11:23 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
[question] access denied OLE error code:80070005









This might fix your problem depending on the actual
code that failed. (Show us more of your code if you need more help.)

 class Watir::IE
 attr_accessor error_checkers
 end
 ie.error_checkers = []

Bret



On
5/8/06, Rodrigo Julian Martin [EMAIL PROTECTED]
wrote:





Hello everybody!











When
watir does a .wait for a page, it throws me the following error:











xecuting
'ruby -C C:/Documents and Settings/testing/Desktop/[Desarrollo] Ensamble
de Circuitos 08-05-2006 ML_Circuito.rb'
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `method_missing': document
(WIN32OLERuntimeError)
 OLE error code:80070005 in Unknown
 Access is denied.






HRESULT error code:0x80020009
 Exception occurred.from
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in
`check_for_http_error'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each'
 ... 6 levels...
from ML_Circuito.rb:411:in `each'
from ML_Circuito.rb:411
from ML_Circuito.rb:404:in `open'
from ML_Circuito.rb:404
Execution completed with exit code 1.

















I
guess that this happen because in the page, there is a banner which have
code of clickexperts (another domain). I can't get the work around for this..
any help? I´ve tried adding that domain to the list of Trusted Sites, but it
didn't help.











If I
missed some info, please let me know.











Cheers!





Rodrigo
Julian Martín






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general












___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general










___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread Rodrigo Julian Martin








Brett, Ive tried what you suggested
in my script as follows:



require 'Watir'

include 'Watir'

class Watir::IE 

attr_accessor error_checkers

end



$browser = IE.new

$browser.error_checkers = [] 



$browser = IE.attach(:title, test)





And it throws me this output



Executing 'ruby -C C:/Documents and
Settings/Administrator/Desktop test_popup'

test_popup:3: undefined local variable or
method `error_checkers' for Watir::IE:Class (NameError)

Execution completed with exit code 1.



Am I doing something wrong? My watir
version is 1.4.1



Thanks for your patience!

Rodrigo Julian Martin











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Martes, 09 de Mayo de 2006
03:26 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] [question]
access denied OLE error code:80070005









On 5/9/06, Rodrigo
Julian Martin [EMAIL PROTECTED]
wrote:





One question Brett.. where should I put that code? On my
script source or in Watir.rb?








This code can really go anywhere. It modifies the base Watir::IE class, but
doesn't have be in the watir.rb file.

 class Watir::IE 
 attr_accessor error_checkers
 end

This code needs to run on your ie object after you have created it and before
you use it.

 ie.error_checkers = []




Bret








___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread John Castellucci
class Watir::IE 
 attr_accessor error_checkers
end

$browser = IE.new

And it throws me this output
undefined local variable or method `error_checkers' for Watir::IE:Class
(NameError)

I suspect the offender is the missing colon (:) before error_checkers in
attr_accessor (it's expecting a symbol).

Try:

attr_accessor :error_checkers





___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread Rodrigo Julian Martin
Thanks John, I've added the missing colon..

Now, the code throws me two Warnings, which I get rid off with setting the 
logger to Error level, and the program seems to continue allright!


Thanks Brett and John! Tomorrow I'll implement this at customer's site and let 
you know.. cheers!

Rodrigo Julian Martin

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Castellucci
Sent: Martes, 09 de Mayo de 2006 04:22 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] [question] access denied OLE error code:80070005

class Watir::IE 
 attr_accessor error_checkers
end

$browser = IE.new

And it throws me this output
undefined local variable or method `error_checkers' for Watir::IE:Class
(NameError)

I suspect the offender is the missing colon (:) before error_checkers in
attr_accessor (it's expecting a symbol).

Try:

attr_accessor :error_checkers





___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-09 Thread Bret Pettichord
A few small changesOn 5/9/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:















Brett, I've tried what you suggested
in my script as follows:



require 'Watir'

include 'Watir'

class Watir::IE 

attr_accessor error_checkers# add a colonattr_accessor :error_checkers 

end# This line does nothing -- delete it
#$browser = IE.new
Rearrange these lines
$browser = IE.attach(:title, test)

$browser.error_checkers = [] Now see if it works.

And it throws me this output



Executing 'ruby -C C:/Documents and
Settings/Administrator/Desktop test_popup'

test_popup:3: undefined local variable or
method `error_checkers' for Watir::IE:Class (NameError)

Execution completed with exit code 1.



Am I doing something wrong? My watir
version is 1.4.1



Thanks for your patience!

Rodrigo Julian Martin











From:
[EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED]] On Behalf Of Bret Pettichord
Sent: Martes, 09 de Mayo de 2006
03:26 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] [question]
access denied OLE error code:80070005









On 5/9/06, Rodrigo
Julian Martin [EMAIL PROTECTED]
wrote:





One question Brett.. where should I put that code? On my
script source or in Watir.rb?








This code can really go anywhere. It modifies the base Watir::IE class, but
doesn't have be in the watir.rb file.

 class Watir::IE 
 attr_accessor error_checkers
 end

This code needs to run on your ie object after you have created it and before
you use it.

 ie.error_checkers = []




Bret









___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] access denied OLE error code:80070005

2006-05-08 Thread Rodrigo Julian Martin
Hello everybody!

When watir does a .wait for a page, it throws me 
the following error:

xecuting 'ruby -C "C:/Documents and Settings/testing/Desktop/[Desarrollo] 
Ensamble de Circuitos 08-05-2006" 
"ML_Circuito.rb"'c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in 
`method_missing': document (WIN32OLERuntimeError) OLE 
error code:80070005 in Unknown Access 
is denied.
 HRESULT error 
code:0x80020009 Exception occurred.from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in 
`check_for_http_error'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each' ... 6 
levels...from ML_Circuito.rb:411:in `each'from 
ML_Circuito.rb:411from ML_Circuito.rb:404:in `open'from 
ML_Circuito.rb:404Execution completed with exit code 1.


I guess that this happen because in the page, there is a banner which 
have code of clickexperts (another domain). I can't get the work around for 
this.. any help? I´ve tried adding that domain to the list of Trusted Sites, but 
it didn't help.

If I missed some info, please let me know.

Cheers!
Rodrigo Julian Martín___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-08 Thread Bret Pettichord
This might fix your problem depending on the actual code that failed. (Show us more of your code if you need more help.) class Watir::IE attr_accessor error_checkers end ie.error_checkers = []
BretOn 5/8/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:
Hello everybody!

When watir does a .wait for a page, it throws me 
the following error:

xecuting 'ruby -C C:/Documents and Settings/testing/Desktop/[Desarrollo] 
Ensamble de Circuitos 08-05-2006 
ML_Circuito.rb'c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in 
`method_missing': document (WIN32OLERuntimeError) OLE 
error code:80070005 in Unknown Access 
is denied.
 HRESULT error 
code:0x80020009 Exception occurred.from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in 
`check_for_http_error'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each' ... 6 
levels...from ML_Circuito.rb:411:in `each'from 
ML_Circuito.rb:411from ML_Circuito.rb:404:in `open'from 
ML_Circuito.rb:404Execution completed with exit code 1.


I guess that this happen because in the page, there is a banner which 
have code of clickexperts (another domain). I can't get the work around for 
this.. any help? I´ve tried adding that domain to the list of Trusted Sites, but 
it didn't help.

If I missed some info, please let me know.

Cheers!
Rodrigo Julian Martín
___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] access denied OLE error code:80070005

2006-05-08 Thread Bret Pettichord
BTW, it's basically a bug that this is so hard to correct.I've just checked in a change to trunk that allows this simpler code to avoid this problem with future versions: ie.disable_checker(NAVIGATION_CHECKER)
I'm actually thinking about providing a more general mechanism for adding or removing methods from being automatically executed after every page load. I really need it for the lazy evaluation as well as to de-couple the xpath support.
BretOn 5/8/06, Bret Pettichord [EMAIL PROTECTED] wrote:
This might fix your problem depending on the actual code that failed. (Show us more of your code if you need more help.) class Watir::IE attr_accessor error_checkers end
 ie.error_checkers = []
BretOn 5/8/06, Rodrigo Julian Martin 
[EMAIL PROTECTED] wrote:
Hello everybody!

When watir does a .wait for a page, it throws me 
the following error:

xecuting 'ruby -C C:/Documents and Settings/testing/Desktop/[Desarrollo] 
Ensamble de Circuitos 08-05-2006 
ML_Circuito.rb'c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in 
`method_missing': document (WIN32OLERuntimeError) OLE 
error code:80070005 in Unknown Access 
is denied.
 HRESULT error 
code:0x80020009 Exception occurred.from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2389:in `document'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1177:in 
`check_for_http_error'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1162:in `set_defaults'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `upto'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1161:in `set_defaults'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1159:in `call'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1512:in `run_error_checks'from 
c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1511:in `each' ... 6 
levels...from ML_Circuito.rb:411:in `each'from 
ML_Circuito.rb:411from ML_Circuito.rb:404:in `open'from 
ML_Circuito.rb:404Execution completed with exit code 1.


I guess that this happen because in the page, there is a banner which 
have code of clickexperts (another domain). I can't get the work around for 
this.. any help? I´ve tried adding that domain to the list of Trusted Sites, but 
it didn't help.

If I missed some info, please let me know.

Cheers!
Rodrigo Julian Martín
___Wtr-general mailing listWtr-general@rubyforge.org

http://rubyforge.org/mailman/listinfo/wtr-general


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Opening a Browser with WET, and then taking control with Watir?

2006-04-26 Thread Rodrigo Julian Martin








Hi all! 



As some of you may remember, I was the guy freaked out with
modal popups Ive sent a couple of messages to the list, and
finally Praveen Kumar Kammitta [EMAIL PROTECTED] suggest me to use WET.



Well, it really worked out and pretty fine!

This is how I finally managed this:



require 'WET'

include WET

$ie=Browser.new()

$ie.goto(https://happiness.dhs.org,
OUTOFPROCESS)

$ie.Dialog(title:=Security
Alert).Button(index:=1).click



This is great! But now I have another trouble (Im a
problematic human, I know :S )

Ive done several and LARGE scripts using Watir, and
now I really dont want to re-code all the lines which has references to
the browser (there are differences between Watir Browser and WET Browser




So, does exists a way of instanciate the WET browser, and
then attach to that browser with Watir? I hope the question is made correctly,
as my english need some improvement



Cheers and Thanks in Advance!

Rodrigo Martin 






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Opening a Browser with WET, and then taking control with Watir?

2006-04-26 Thread Bret Pettichord
You can use Watir::IE.attach() to use Watir with an existing browser window. It doesn't matter if it was opened manually or with Wet.On 4/26/06, Rodrigo Julian Martin
 [EMAIL PROTECTED] wrote:













Hi all! 



As some of you may remember, I was the guy freaked out with
modal popups… I've sent a couple of messages to the list, and
finally Praveen Kumar Kammitta [[EMAIL PROTECTED]] suggest me to use WET.



Well, it really worked out and pretty fine!

This is how I finally managed this:



require 'WET'

include WET

$ie=Browser.new()

$ie.goto(https://happiness.dhs.org
,
OUTOFPROCESS)

$ie.Dialog(title:=Security
Alert).Button(index:=1).click



This is great! But now I have another trouble (I'm a
problematic human, I know :S )

I've done several and LARGE scripts using Watir, and
now I really don't want to re-code all the lines which has references to
the browser (there are differences between Watir Browser and WET Browser…




So, does exists a way of instanciate the WET browser, and
then attach to that browser with Watir? I hope the question is made correctly,
as my english need some improvement…



Cheers and Thanks in Advance!

Rodrigo Martin 







___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] [question] Does the Click method accepts coordinates?

2006-04-25 Thread Rodrigo Julian Martin








Hello!



Im developing a test for a web page, and Ive
found a .gif image which acts as a menu, mapped by coordinates Is there
a way of telling watir to .Click by coordinates?



The file uses the folowing map:



MAP NAME=menu_home

AREA SHAPE=RECT COORDS=0,0,69,22
HREF="" id=MENU:BROWSECATEG

AREA SHAPE=RECT COORDS=69,0,129,22
HREF="" id=MENU:VENDER

AREA SHAPE=RECT COORDS=129,0,190,22
HREF="" id=MENU:BUSC

AREA SHAPE=RECT COORDS=190,0,311,22
HREF=""
id=MENU:MIML

AREA SHAPE=RECT COORDS=311,0,418,22
HREF="" id=MENU:MPAGO

AREA SHAPE=RECT COORDS=418,0,512,22
HREF="" id=MENU:FOROS

AREA SHAPE=RECT COORDS=512,0,581,22
HREF="" id=MENU:AYUDAS

/MAP/td



Thanks in Advance!

By the way, Im still fighting against modal dialogs
but Ill win sooner or later =P



Cheers

Rodrigo J. Martin.






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5

2006-04-21 Thread Bret Pettichord
Rodrigo,I generally try to set my security settings so these dialogs don't show up in the first place. It's quite possible that they have been designed not be to be scriptable specifically to prevent scripting-based attacks from being able to directly manipulate the security dialogs.
There has been little or no work in this area with Watir since 1.4.1. Look at our code and see if you can find a solution using Autoit or the direct calls to the Windows API. Frankly, Watir's support for windows non-web modal dialogs is limited and not terribly reliably. Fixing it was originally in the Road Map for 
1.5, but it may get deferred.BretOn 4/20/06, Rodrigo Julian Martin [EMAIL PROTECTED]
 wrote:
Hello everybody, i´m having a terrible headache with the 
Security Alert Dialogs that appears in my tests...

I´ve already tried the WinHelper, WinSecurity 
thread in Watir 1.41 and that doesn´t work at all..
Today i´ve downloaded the development version of 
Watir 1.5 (which I guess it fix this modal dialogs troubles) and tried again, 
with no good results at all... Anybody could achieve this? Sorry if i´m 
repetitive but i´m really stucked with this =(

Cheers and Thanks in Advance

Rodrigo Julián Martín
___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5

2006-04-21 Thread Rodrigo Julian Martin
Dear Brett:
 
I guess that setting the security level in order that the popups doesnt appear 
is the best solution! But, i've tried in Internet Explorer without success... 
I've added the site to my Trusted Sites, i've chosen the option: Don't prompt 
for client certificate selection..., and this popup still appears... 
Can you tell me more or less what i have to set in order this popups doesn't 
appear?
 
Thank you so much for the response..
 
Cheers
Rodrigo Julian Martin 



De: [EMAIL PROTECTED] en nombre de Bret Pettichord
Enviado el: Vie 21/04/2006 11:35 a.m.
Para: wtr-general@rubyforge.org
Asunto: Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5


Rodrigo,

I generally try to set my security settings so these dialogs don't show up in 
the first place. It's quite possible that they have been designed not be to be 
scriptable specifically to prevent scripting-based attacks from being able to 
directly manipulate the security dialogs. 

There has been little or no work in this area with Watir since 1.4.1. Look at 
our code and see if you can find a solution using Autoit or the direct calls to 
the Windows API. Frankly, Watir's support for windows non-web modal dialogs is 
limited and not terribly reliably. Fixing it was originally in the Road Map for 
1.5, but it may get deferred.

Bret


On 4/20/06, Rodrigo Julian Martin [EMAIL PROTECTED]  wrote: 

Hello everybody, i´m having a terrible headache with the Security Alert 
Dialogs that appears in my  tests...
 
I´ve already tried the WinHelper, WinSecurity thread in Watir 1.41 and 
that doesn´t work at all..
Today i´ve downloaded the development version of Watir 1.5 (which I 
guess it fix this modal dialogs troubles) and tried again, with no good results 
at all... Anybody could achieve this? Sorry if i´m repetitive but i´m really 
stucked with this =(
 
Cheers and Thanks in Advance
 
Rodrigo Julián Martín

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general




winmail.dat___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5

2006-04-21 Thread Bret Pettichord
If i knew what security dialog you were talking about and i knew more about how the IE security settings work, then i could answer your question. Sadly i know neither. BretOn 4/21/06, 
Rodrigo Julian Martin [EMAIL PROTECTED] wrote:
Dear Brett:I guess that setting the security level in order that the popups doesnt appear is the best solution! But, i've tried in Internet Explorer without success... I've added the site to my Trusted Sites, i've chosen the option: Don't prompt for client certificate selection..., and this popup still appears...
Can you tell me more or less what i have to set in order this popups doesn't appear?Thank you so much for the response..CheersRodrigo Julian MartinDe: 
[EMAIL PROTECTED] en nombre de Bret PettichordEnviado el: Vie 21/04/2006 11:35 a.m.Para: wtr-general@rubyforge.org
Asunto: Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5Rodrigo,I generally try to set my security settings so these dialogs don't show up in the first place. It's quite possible that they have been designed not be to be scriptable specifically to prevent scripting-based attacks from being able to directly manipulate the security dialogs.
There has been little or no work in this area with Watir since 1.4.1. Look at our code and see if you can find a solution using Autoit or the direct calls to the Windows API. Frankly, Watir's support for windows non-web modal dialogs is limited and not terribly reliably. Fixing it was originally in the Road Map for 
1.5, but it may get deferred.BretOn 4/20/06, Rodrigo Julian Martin [EMAIL PROTECTED]  wrote:Hello everybody, i´m having a terrible headache with the Security Alert Dialogs that appears in mytests...
I´ve already tried the WinHelper, WinSecurity thread in Watir 1.41 and that doesn´t work at all..Today i´ve downloaded the development version of Watir 1.5 (which I guess it fix this modal dialogs troubles) and tried again, with no good results at all... Anybody could achieve this? Sorry if i´m repetitive but i´m really stucked with this =(
Cheers and Thanks in AdvanceRodrigo Julián Martín___Wtr-general mailing list
Wtr-general@rubyforge.orghttp://rubyforge.org/mailman/listinfo/wtr-general___
Wtr-general mailing listWtr-general@rubyforge.orghttp://rubyforge.org/mailman/listinfo/wtr-general

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5

2006-04-21 Thread jkohl
To get rid of it you have to install a certificate on the server I believe.

I struggled with this a couple of years ago. On Win2K Winclickers would see it,
but on my XP box I couldn't dismiss it.

-Jonathan

Quoting Bret Pettichord [EMAIL PROTECTED]:

 If i knew what security dialog you were talking about and i knew more about
 how the IE security settings work, then i could answer your question. Sadly
 i know neither.
 
 Bret
 
 On 4/21/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:
 
  Dear Brett:
 
  I guess that setting the security level in order that the popups doesnt
  appear is the best solution! But, i've tried in Internet Explorer without
  success... I've added the site to my Trusted Sites, i've chosen the
 option:
  Don't prompt for client certificate selection..., and this popup still
  appears...
  Can you tell me more or less what i have to set in order this popups
  doesn't appear?
 
  Thank you so much for the response..
 
  Cheers
  Rodrigo Julian Martin
 
  
 
  De: [EMAIL PROTECTED] en nombre de Bret Pettichord
  Enviado el: Vie 21/04/2006 11:35 a.m.
  Para: wtr-general@rubyforge.org
  Asunto: Re: [Wtr-general] [question] Again Modal Dialogs and Watir 1.5
 
 
  Rodrigo,
 
  I generally try to set my security settings so these dialogs don't show up
  in the first place. It's quite possible that they have been designed not
 be
  to be scriptable specifically to prevent scripting-based attacks from
 being
  able to directly manipulate the security dialogs.
 
  There has been little or no work in this area with Watir since 1.4.1. Look
  at our code and see if you can find a solution using Autoit or the direct
  calls to the Windows API. Frankly, Watir's support for windows non-web
 modal
  dialogs is limited and not terribly reliably. Fixing it was originally in
  the Road Map for 1.5, but it may get deferred.
 
  Bret
 
 
  On 4/20/06, Rodrigo Julian Martin [EMAIL PROTECTED]  wrote:
 
  Hello everybody, i´m having a terrible headache with the Security
  Alert Dialogs that appears in my  tests...
 
  I´ve already tried the WinHelper, WinSecurity thread in Watir
 1.41and that doesn´t work at all..
  Today i´ve downloaded the development version of Watir 1.5 (which
  I guess it fix this modal dialogs troubles) and tried again, with no good
  results at all... Anybody could achieve this? Sorry if i´m repetitive but
  i´m really stucked with this =(
 
  Cheers and Thanks in Advance
 
  Rodrigo Julián Martín
 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 
 
 
 
 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 
 
 




___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question about Select-Lists

2006-04-18 Thread Rodrigo Julian Martin








Hello! 



I am trying to make a code that could scan all the items of
a Select-List, in order to store them and be able to validate data. I tried a
couple of things like working with

the each method for the options, or with GetSelected Items,
but I cant find the way Is there a simple way? 



Thank you so much for your help!

Cheers



Rodrigo Julian Martin.






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question about Select-Lists

2006-04-18 Thread Cain, Mark








Try something like this to get all select_list
contents:



 myList = $ie.select_list( :name, 'select1').getAllContents



If you wanted to select everything in the
list you could do this:



 for lst in myList

 $ie.selectBox( :name, 'select1').select(#{lst})

 end



Hope this helps, 







--Mark















From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rodrigo Julian Martin
Sent: Tuesday, April 18, 2006
10:37 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Question
about Select-Lists





Hello! 



I am trying to make a code that could scan all the items of a
Select-List, in order to store them and be able to validate data. I tried a
couple of things like working with

the each method for the options, or with GetSelected Items,
but I cant find the way Is there a simple way? 



Thank you so much for your help!

Cheers



Rodrigo Julian Martin.






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question About Global Variables between ruby files

2006-03-29 Thread Rodrigo Julian Martin








Thanks Deepa and Brett!

As you said, I will have to construct my
own test suite, based on a Main program which will call the other tests as
functions. 



Regards!



Rodrigo Julian Martin











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Martes, 28 de Marzo de 2006
09:20 p.m.
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
Question About Global Variables between ruby files





You could store them in
global variables.

The tricky part is making sure that the execute in the order you want them to.

The standard Test::Unit framework puts together test suites in a somewhat
random order. This is by design, because unit tests should be independent of
each other and not depend on order. 

Since you want to break with this convention, you should construct your own
test suite rather than depend on the default methods.

Bret



On 3/28/06, Rodrigo
Julian Martin [EMAIL PROTECTED]
wrote:





Hi
all,



I've
another question Is there a way to share variables between several .rb files
which are loaded as a Test Suite? e.g. An array which is loaded in test1.rb and
that I want to use in test2.rb.



Thanks
in Advance!

Rodrigo
Julian Martin






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general










___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question About Global Variables between ruby files

2006-03-28 Thread Deepa Mallapareddy
Hi Rodrigo,Yes you can. I havent treid for an array but am sure you can. I have used global variable with '$' in front of the variable and then use it in other ruby files. I have declared this in the set up file. For example $Yahoolink="www.yahoo.com"and I can use "$Yahoolink" in other ruby files Thanks!  Deepa  Rodrigo Julian Martin [EMAIL PROTECTED] wrote:Hi all,I’ve another question… Is there a way to share variables !
between
 several .rb files which are loaded as a Test Suite? e.g. An array which is loaded in test1.rb and that I want to use in test2.rb.Thanks in Advance!  Rodrigo Julian Martin___Wtr-general mailing listWtr-general@rubyforge.orghttp://rubyforge.org/mailman/listinfo/wtr-general  Whatever you can do or dream you can, begin it. Boldness has genius, power, and magic in it. --Johann Wolf!
gang von
 Goethe   Deepa Mallapareddy, 4981,Catoctin Drive, Apt#15,San Diego CA - 92115
		New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question about Plans for Watir 2.0 Find Objects

2006-03-24 Thread Bret Pettichord
Take a look at this plan for 1.5. http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap

This plan is still a good description of our intentions. The main
thing missing is that we also have xpath support in 1.5.

Much of this is already implemented in development.

Bret

On 3/23/06, Andrew McFarlane [EMAIL PROTECTED] wrote:
 Bret,

 I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I
 didn't see a mention of being able to specify elements using multiple
 attribute/value pairs.  I have seen you mention, however, that you were
 considering merging (some? all?) WET functionality into WATIR.

 What do you see here, if anything?

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about Plans for Watir 2.0 Find Objects

2006-03-24 Thread Bret Pettichord
On 3/24/06, Andrew McFarlane [EMAIL PROTECTED] wrote:
 Thanks.  That clears up some things.

 I did not see mention that one would be able to specify an element by
 multiple attribute/value pairs, so I'm assuming that will not be in 1.5.

That sounds right. I've actually heard little demand for it, except
for the case of radio lists (where we have a workaround).

You can always put it on Jira and see how many votes it gets.

 From: Bret Pettichord [EMAIL PROTECTED]
 Reply-To: wtr-general@rubyforge.org
 To: wtr-general@rubyforge.org
 Subject: Re: [Wtr-general] Question about Plans for Watir 2.0  Find
 Objects
 Date: Fri, 24 Mar 2006 12:53:58 -0600
 
 Take a look at this plan for 1.5.
 http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap
 
 This plan is still a good description of our intentions. The main
 thing missing is that we also have xpath support in 1.5.
 
 Much of this is already implemented in development.
 
 Bret
 
 On 3/23/06, Andrew McFarlane [EMAIL PROTECTED] wrote:
   Bret,
  
   I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I
   didn't see a mention of being able to specify elements using multiple
   attribute/value pairs.  I have seen you mention, however, that you were
   considering merging (some? all?) WET functionality into WATIR.
  
   What do you see here, if anything?
 
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general


 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question about Plans for Watir 2.0 Find Objects

2006-03-23 Thread Rodrigo Julian Martin








Hi all, I was reading the Brett Plans for Watir 2.0. And I
am wondering if there is some release date in mind? Or something approximated
at least



Thank you all!





Ps: Im working on a new method for finding objects
accordly of their properties and values (passed as parameters) Someone is doing
something similar? Im studying the def show of watir.rb, just as Chris
McMahon suggest me



Regards, Rodrigo Julian Martin






___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question about Plans for Watir 2.0 Find Objects

2006-03-23 Thread Chris McMahon
 Ps:  I'm working on a new method for finding objects accordly of their
 properties and values (passed as parameters) Someone is doing something
 similar? I'm studying the def show… of watir.rb, just as Chris McMahon
 suggest me…

Probably easiest just to use them:

C:\Documents and Settings\cmcmahonirb
irb(main):001:0 require 'watir'
= true
irb(main):002:0 include Watir
= Object
irb(main):003:0 ie = IE.attach(:title, /Google/)
..
irb(main):007:0 ie.show_frames
there are 0 frames
= 0..-1
irb(main):008:0
.
irb(main):008:0 ie.show_forms
There are 1 forms
Form name: f
   id:
   method: get
   action: /search
= 0..0
irb(main):009:0

irb(main):009:0 ie.show_images
image: name:
 id:
src:
  index: 1
image: name:
 id:
src: http://www.google.com/intl/en/images/logo.gif
  index: 2
= nil
irb(main):010:0
..
etc. etc.

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question about Plans for Watir 2.0 Find Objects

2006-03-23 Thread Andrew McFarlane

Bret,

I was also looking at the 2.0 plan that you laid out on 5/27/2005, and I 
didn't see a mention of being able to specify elements using multiple 
attribute/value pairs.  I have seen you mention, however, that you were 
considering merging (some? all?) WET functionality into WATIR.


What do you see here, if anything?



From: Bret Pettichord [EMAIL PROTECTED]
Reply-To: wtr-general@rubyforge.org
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Question about Plans for Watir 2.0  Find 
Objects

Date: Thu, 23 Mar 2006 13:11:49 -0600

On 3/23/06, Rodrigo Julian Martin [EMAIL PROTECTED] wrote:
 Hi all, I was reading the Brett Plans for Watir 2.0. And I am wondering 
if

 there is some release date in mind? Or something approximated at least…

There is no date in mind. However, you can take a look at the firefox
branch of Watir and try it out.

 Ps:  I'm working on a new method for finding objects accordly of their
 properties and values (passed as parameters) Someone is doing something
 similar? I'm studying the def show… of watir.rb, just as Chris McMahon
 suggest me…

The watir code in development (in subversion) supports this.

E.g. ie.div(:text, foo) will attach to the div whose text property
is foo. This is code is general and supports all objects (except
maybe frames) and all attribute/properties.

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] question

2006-01-30 Thread Zeljko Filipin
Simple way:

put your scripts in the same folder (example: script1.rb, script2.rb...)

make script that calls other scripts:

require script1
require script2

Zeljko

2006/1/27, Rexhina Alickolli [EMAIL PROTECTED]:



 Hello guys:

 I have just started to work with ruby and I am wondering if there is a way
 to write a ruby test script that can call other ruby test scripts?  ( so I
 want to merge and run all the methods which are written in separate ruby
 test scripts)



 Thanks--regina


 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general




--
http://iskusivac.blog.hr/

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question on clicking on link

2006-01-29 Thread Atilla Ozgur
1.You may try to add this site to your trusted sites
2.You may try to add this site to your .hosts file

On 1/25/06, Chris Schmechel [EMAIL PROTECTED] wrote:

 Thanks for the reply, it got me thinking.  I found the problem:

  ie.link(:url, download.html).click

 needs to become:

  ie.link(:url, /download.html/).click

 and it works!  Now I'm running into another problem.  Due to my
 browser security settings -- I'm getting the following ActiveX control
 upon download:

  To help protect your security, Internet Explorer blocked this site from
  downloading files to your computer.  Click here for options...

 I'd like to be able to detect this and then issue the click on the download
 button (ie. start it going ).

 Afterwards, you get another dialog box: File Download - Security Warning.
 With the options to Run, Save, or Cancel the file download.  How can I
 handle
 this as well?

 Thanks again!

 Chris Schmechel


 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general



___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question on clicking on link

2006-01-29 Thread mb
Actually, there's a danger in using

/download.html/

in that it will match not only

download.html

but also

downloadxhtml

(Now that's not likely to be an issue in this case, but you can see how it 
might be in other cases.  If you were looking for a link like

/foo.asp/

would match a link that contained

foogasp.html

if it appeared on the page before

foo.asp

To be specific (and mostly to develop good regular expression hygeine habits), 
you would escape the period, such that your regular expression would be

/download\.html/


I AM a pedant, but I've been bitten by that before too, so I hope this 
helps...

---Michael B.

 On 1/25/06, Chris Schmechel [EMAIL PROTECTED] wrote:

 Thanks for the reply, it got me thinking.  I found the problem:

  ie.link(:url, download.html).click

 needs to become:

  ie.link(:url, /download.html/).click

 and it works!  Now I'm running into another problem.  Due to my
 browser security settings -- I'm getting the following ActiveX control
 upon download:

  To help protect your security, Internet Explorer blocked this site from
  downloading files to your computer.  Click here for options...

 I'd like to be able to detect this and then issue the click on the download
 button (ie. start it going ).

 Afterwards, you get another dialog box: File Download - Security Warning.
 With the options to Run, Save, or Cancel the file download.  How can I
 handle
 this as well?

 Thanks again!

 Chris Schmechel


 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general


 
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general

DevelopSense:  Software Testing in Plain English
http://www.developsense.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Question on clicking on link

2006-01-25 Thread Chris Schmechel
Hi,

I'm trying toautomateclicking on the following link (ie. image on my
HTML page):

 a href="" src="" width=162 height=35 border=0/a br
which then takes me to thesubsequent download page. I've tried the following without any luck:
 ie.link(:url, download.html).click
Any suggestions?
Thanks in advance,
Chris Schmechel
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question on clicking on link

2006-01-25 Thread Bret Pettichord
What error do you get?On 1/25/06, Chris Schmechel [EMAIL PROTECTED] wrote:
Hi,

I'm trying toautomateclicking on the following link (ie. image on my
HTML page):

 a href="" src="" width=162 height=35 border=0/a br
which then takes me to thesubsequent download page. I've tried the following without any luck:
 ie.link(:url, download.html).click
Any suggestions?
Thanks in advance,
Chris Schmechel

___Wtr-general mailing listWtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Question on clicking on link

2006-01-25 Thread Chris Schmechel

Thanks for the reply, it got me thinking. I found the problem:

ie.link(:url, download.html).click 

needs to become:

ie.link(:url, /download.html/).click

and it works! Now I'm running into another problem. Due to my
browser security settings -- I'm getting the following ActiveX control
upon download:

To help protect your security, Internet Explorer blocked this site from 
downloading files to your computer. Click here for options...

I'd like to be able to detect this and then issue the click on the download
button (ie. start it going ).

Afterwards, you get another dialog box: File Download - Security Warning.
With the options to Run, Save, or Cancel the file download. How can I handle
this as well?

Thanks again!

Chris Schmechel


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Question...

2005-08-24 Thread Jeff Wood
I've been looking through the function lists ... There are a number of
things like

showAllObjects and show_all_objects
textField and text_field 
and on and on ... 

Was there a decision to change apis at some point ... that's what I
seem to be seeing... and if so, which is the current preferred API ?

I mean, I prefer to use as few _ chars as possible ... but, let me know.

j.


-- 
So long, and thanks for all the fish

Jeff Wood

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question...

2005-08-24 Thread Paul Rogers
I originally wrote the methods using camelCase. the prefferred ruby way is 
train_case.
The camelCase ones will get deprecated, so use train_case

Paul

- Original Message -
From: Jeff Wood [EMAIL PROTECTED]
Date: Wednesday, August 24, 2005 9:31 am
Subject: [Wtr-general] Question...

 I've been looking through the function lists ... There are a 
 number of
 things like
 
 showAllObjects and show_all_objects
 textField and text_field 
 and on and on ... 
 
 Was there a decision to change apis at some point ... that's what I
 seem to be seeing... and if so, which is the current preferred API ?
 
 I mean, I prefer to use as few _ chars as possible ... but, let me 
 know.
 j.
 
 
 -- 
 So long, and thanks for all the fish
 
 Jeff Wood
 
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general
 

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question...

2005-08-24 Thread Jeff Wood
darn, but, ok.

thanks.

j.

On 8/24/05, Paul Rogers [EMAIL PROTECTED] wrote:
 I originally wrote the methods using camelCase. the prefferred ruby way is 
 train_case.
 The camelCase ones will get deprecated, so use train_case
 
 Paul
 
 - Original Message -
 From: Jeff Wood [EMAIL PROTECTED]
 Date: Wednesday, August 24, 2005 9:31 am
 Subject: [Wtr-general] Question...
 
  I've been looking through the function lists ... There are a
  number of
  things like
 
  showAllObjects and show_all_objects
  textField and text_field
  and on and on ...
 
  Was there a decision to change apis at some point ... that's what I
  seem to be seeing... and if so, which is the current preferred API ?
 
  I mean, I prefer to use as few _ chars as possible ... but, let me
  know.
  j.
 
 
  --
  So long, and thanks for all the fish
 
  Jeff Wood
 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 
 
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general
 


-- 
So long, and thanks for all the fish

Jeff Wood

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Question...

2005-08-24 Thread Bret Pettichord

At 11:21 AM 8/24/2005, Jeff Wood wrote:

darn, but, ok.


with time you will thank me.

_
 Bret Pettichord
 www.pettichord.com

___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


RE: [Wtr-general] Question - Why ruby?

2005-08-14 Thread Walter Kruse
Title: Message



NB: This email and its contents are subject to our email legal 
noticewhich can be viewed at http://www.sars.gov.za/Email_Disclaimer.pdf

I have 
asimilar story. I was fortunate enough to be able to use Robot, SAMIE and 
WATiR on the same project. A few months down the line and the scripts that run 
everyday are...WATiR ! Michael Kelly's article really got me using 
Ruby.

SAMIE 
is also very good, and the best about it is that Perl already has very mature 
supprt for DBI and it has Win32::GUITest. I still use Perl for all the database 
stuff. Ruby's DBI is not there yet. But I would like to use WATiR and Ruby more 
and more in the future.Unfortunately Ruby is as cryptic to me as Perl is 
to most people.I have looked at PAMIE too, as I am doing a series of tool 
reviews for the TestFOCUS magazine.

krgds
Walter

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  Sent: 01 August 2005 04:31To: 
  wtr-general@rubyforge.orgSubject: RE: [Wtr-general] Question - Why 
  ruby?
  
  My 2 cents...for whatever it is 
  worth.
  
  I started using Python's PAMIE framework to 
  automate. However, the support was sporadic (the guy working on it was 
  very busy and couldn't devote enough time to support the framework). 
  Eventually I ran into a roadblock with popups (ironic given the volume of 
  messages on this subject)--the framework had not evolved enough to support 
  this activity yet. I also looked at SAMIE (way too cryptic), IEUnit 
  (same roadblock as PAMIE) as well as a bout 15 other frameworks all boasting 
  to have what I needed at a price. Enter Ruby. WATIR is by far the 
  most complete web testing framework out here--that doesn't cost an arm and a 
  leg. And this forum is the most active and well supported that I have 
  seen. You can post a question and is just a short period of time get 
  someone (most of the time the architects of the framework!) who will steer you 
  in the right direct, give you a work around to get over any roadblocks, or add 
  it to the framework if it doesn't currently exist. That is the reason I 
  switched and tell everyone interest (and those not) that Ruby is the way to 
  go! Save your money, get WATIR!
  
  --Mark
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  On Behalf Of Raghu VenkataramanaSent: Sunday, July 31, 2005 8:28 PMTo: 
  wtr-general@rubyforge.orgSubject: Re: 
  [Wtr-general] Question - Why ruby?
  
  Bret, Jonathan:
  
  Thanks for these notes. I personally like Ruby's 
  object oriented approach.
  
  The only 'flip' I found about ruby that I find is the 
  relatively scarce
  resources / documentation when compared to Python. 
  Almost all searches
  point to a different version of the 'pragmatic 
  programmer'. Are there other
  online resources that you guys could point me to? For 
  example, when trying
  to do something with the Win32 API callbacks, I 
  couldn't find much help.
  
  Thanks
  Raghu
  
  Bret Pettichord wrote:
  
   Perl encourages cryptic code, which makes it a 
  bad choice. It also 
   lacks an interactive 
  shell.
  
   Python could work. Ruby was Brian Marick's choice 
  and he was convinced 
   to switch from Python to Ruby when he sat with 
  Dave Thomas and Andy 
   Hunt on a bus.
  
   At 12:26 PM 7/31/2005, Raghu Venkataramana 
  wrote:
  
   Hi All,
  
   I was explaining to my friend about Watir and 
  its nice capabilities.
   In the middle of the conversation he asked me 
  as to why Watir uses
   Ruby, which is not as well known as Perl, 
  Python or other scripting
   languages. Is there a special reason why Ruby 
  is being used or is
   just incidental.
  
   Thanks
   Raghu
   
  ___
   Wtr-general mailing 
  list
   
  Wtr-general@rubyforge.org
   
  http://rubyforge.org/mailman/listinfo/wtr-general
  
  
   
_
   Bret 
Pettichord
   
  www.pettichord.com
  
   
  ___
   Wtr-general mailing 
  list
   
  Wtr-general@rubyforge.org
   
  http://rubyforge.org/mailman/listinfo/wtr-general
  
  
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


  1   2   >