Re: [Wtr-general] How to post a failed message when the assert fails

2007-04-13 Thread Alan Ark


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vamsi
Sent: Friday, April 13, 2007 5:35 AM
To: [EMAIL PROTECTED]
Subject: [Wtr-general] How to post a failed message when the assert fails

Hi

I am using this function : assert_equal(1,2) -->  when i execute this 
imeediatley will get the error message and stops the script execution.

insetad of that , is there any way to post failed message like "expected 1, but 
it was 2"

Thanks in advance.

Regards
Vamsi
___

[Arkie] What happens when you try

assert_equal(1,2,"expected 1, but it was 2")

I'm pretty sure that the assertions takes in an optional message to be 
displayed when the assert fails.


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.2.0/757 - Release Date: 4/11/2007 5:14 PM
 
___
Wtr-general mailing list
[EMAIL PROTECTED]
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] OT: Regular Expression help

2007-03-15 Thread Alan Ark
Hi Paul.

 

Just a few notes.

 

The “^” I believe is an anchor tag to the beginning of the line, so having a 
bunch of these probably caused some of your problems.

 

Here’s a regex that I came up with. 

I used the “?” qualifier to make the regex non-greedy – which probably would 
have been the next thing that you ran into.

 

 

paul=~/\".*?\"\t\".*?\"\t\".*?\"\t\"(.*?)\"\t\"(.*?)\"/

 

I tested this real quick (below) and it looks to work

irb(main):015:0> paul=File.open("C:/temp/paul.txt")

=> #

irb(main):016:0> pop=paul.gets

=> "\"one\"\t\"1\"\t\" 0.1234\"\t\"0\"\t\"4\"\n"

irb(main):017:0> pop=~/\".*?\"\t\".*?\"\t\".*?\"\t\"(.*?)\"\t\"(.*?)\"/

=> 0

irb(main):018:0> $1

=> "0"

irb(main):019:0> $2

=> "4"

 

 

As an aside, what’s wrong with reading the line, then splitting it into an 
array?

I think that would have been much more readable than using the regex soln.

 

Regards

-Alan

 

   _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Carvalho
Sent: Thursday, March 15, 2007 9:30 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] OT: Regular Expression help

 

Hi there.  After several hours of looking at this problem, I've decided to ask 
for some help.

Here's the problem:  I have an input text file that has a series of values 
stored like this:
"one"   "1"   " 0.1234"   "0"   "4"
"two"   "3"   "1."   "1"   "0"
...

I want the values in the 4th and 5th quotes on each line.  I originally thought 
about dumping each line 'split' into an array and working with the array, but 
then I thought it might save me time if I could just figure out the regular 
expression to get the right values. 

I've read through an online Regular Expression tutorial, reviewed a few books, 
and downloaded two apps (PowerGREP and Regexile) to help me try and figure this 
out but so far no luck.

Here's the line I started with: 
line =~ /^\"[^"]*"\t\"[^"]*"\t\"[^"]*"\t\"([^"]*)"\t\"([^"]*)"\t/

=> Expect $1 and $2 to hold the values I want... the (bracketed) regex's 

- I tried switching the \t with \s but no luck
- tried adding and removing extra backslashes around the quotes, but nothing
- tried adding and removing all sorts of other characters but still can't get 
it to work. 

Can anyone help me figure out how to parse these input lines in a quick and 
efficient way?  I wanted to avoid having to rely on arrays, but I'm ready to 
give up and use them right about now.

Please let me know.  Thanks in advance.  Paul C. 

(P.S. the *actual* input file has something like 20 values on each line.  If I 
can figure out the pattern above for the simplified input file, I'm sure I can 
apply it to the larger real input file.)



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.11/722 - Release Date: 3/14/2007 3:38 
PM


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.11/722 - Release Date: 3/14/2007 3:38 
PM
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Press Ctrl key while clicking on a link.

2007-02-13 Thread Alan Ark
What's wrong with just turning off pop-up blocking in the first place?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of barry
Sent: Tuesday, February 13, 2007 12:08 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Press Ctrl key while clicking on a link.

I need to simulate this scenario:
Press Ctrl key while clicking on a link to by pass the popup blocking. Is there 
a way to do this in WATIR?


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.37/682 - Release Date: 2/12/2007 1:23 
PM
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] getting commnad line arguements

2007-02-12 Thread Alan Ark
Ah, you're using test/unit and running into this problem.  That bit of 
information that would have been pretty useful.

 

Try putting the args that you want as the end of the cmd line, and precede them 
with a double dash.  That should let test/unit pass them thru.

 

Something that looks like this

 

Ruby myscript.rb -- args go here to be passed to tests.

 

I forget where I saw this from.  

 

Hth

-Alan

 

   _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clayton 
Cottingham
Sent: Monday, February 12, 2007 8:30 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] getting commnad line arguements

 

This wont work , as test/unit 

 Clobbers the command line args

 

Chris's solution will work

 

 

 

   _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Željko Filipin
Sent: Monday, February 12, 2007 1:50 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] getting commnad line arguements

 

HYPERLINK 
"http://www.rubycentral.com/book/rubyworld.html"http://www.rubycentral.com/book/rubyworld.html
-- 
Zeljko Filipin
HYPERLINK "http://zeljkofilipin.com"zeljkofilipin.com 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.37/682 - Release Date: 2/12/2007 1:23 
PM



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.37/682 - Release Date: 2/12/2007 1:23 
PM
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] 'http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel', is not working

2007-02-12 Thread Alan Ark
This link is working for me.

What was the error you were getting?  Did you try just going to 
http://wiki.rubygarden.org  and navigating from there?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vijay
Sent: Monday, February 12, 2007 2:52 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] 
'http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel', is not working

Thank you bb-tester for your 'Scripting_Excel html file'.  I appreviate your 
presence of mind in having that page saved.  

Vijay
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6520&messageID=18572#18572
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date: 2/7/2007 3:33 
PM
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.37/682 - Release Date: 2/12/2007 1:23 
PM
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Need Regular Expression help with a URL string

2007-01-11 Thread Alan Ark
Hi Paul.

 

The following should work:

 

irb(main):001:0> web_url = 'http://foo/bar.html'

=> "http://foo/bar.html";

irb(main):002:0> web_url=~/(.*)\//

=> 0

irb(main):003:0> p $1

"http://foo";

nil

 

The regex (.*)\/

 

Mean to match everything you can to a slash.  Since the * operator is “greedy” 
it will grab everything it can up to that last slash.

The var $1 is a temp var created by the regex.  It should contain the value 
captured by the parens.

 

Thanks

-Alan

 

 

   _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Carvalho
Sent: Thursday, January 11, 2007 9:54 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Need Regular Expression help with a URL string

 

Okay, I give up.  I've worked on this for over an hour and I need more 
experienced help.  (Web searches and book references haven't helped either.)

I have a URL in a string and I'd like to replace part of it but first I need to 
find the part that I care about.  Here's an example of the string: 

web_url = 'HYPERLINK "http://foo/bar.html"http://foo/bar.html'

Now, what I am trying to do is find the *last* forward slash (/) in that string 
so that I can then replace everything after it.  I am having difficulty finding 
that last slash though. 

I am trying to use the   str[ regexp, int ]  function, but I can't seem figure 
it out.

Can anyone help me with this regexp?  Once I get it I'll figure out what's the 
best function for what I need to do.  Thanks. 

Paul C.



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Storing shorthand variables in a module

2006-12-14 Thread Alan Ark
 

I’ve been trying to store a list of nodes as variables, accessible from a 
module, but don’t think it is suitable:

 

tt_choose_patient  = ie.frame("left").link(:index, 3)

tt_diabetes= ie.frame("left").link(:index, 6)

 

(etc)

 

 

[Arkie] 

Without having some source to look at, I would have to ask if there is some 
type of immutable attribute available that you can reference instead?

Id’s or name or even href might be good choices.  Using a regex might be useful 
as well.

 

The reason being that there are a load of these nodes and accessing them 
through the index is brittle. What I ‘d like is for scripts to be able to 
access the node without having to specify right down to the level of the node- 
that way if the nodes changed, I can do one update and all the test scripts 
remain ok.

 

I want to be able to include the module and do something like

tt_choose_patient.click

 

Any suggestions?

 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.18/586 - Release Date: 12/13/2006



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.18/586 - Release Date: 12/13/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Problems with the watir email list?

2006-11-15 Thread Alan Ark
Hi folks.

I was just wondering if anyone else was getting the Watir list emails 
correctly? 

I double checked that I am subscribed to the watir list correctly 
(http://rubyforge.org/mailman/options/wtr-general), but have not recieved any 
emails since Friday 11/10th.

My back-up plan is to just use the forums (like now).

Any comments or ideas?
Thanks
-Alan
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5274&messageID=14644#14644
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] [Test] Ignore

2006-11-14 Thread Alan Ark








Is this turned on?  No messages for me to fall behind on
since Friday

 







Alan
Ark | Lead QA Engineer | Complí | [EMAIL PROTECTED] | office: 503.294.2020 | fax: 503.294.1200 | www.compli.com


 








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.5/533 - Release Date: 11/13/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] ASP.NET and Watir

2006-10-26 Thread Alan Ark








I am using Watir to extensively test our
ASP.NET application.

 

I would start with using irb to start your
investigations on what you are actually looking at.  The show* commands are
what I would use.

 

Both IE and Firefox also have a web
developer extensions available so that you can get a peek into your page a
little easier (without having to do a view source).









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Studner
Sent: Tuesday, October 24, 2006
1:05 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] ASP.NET and
Watir



 

Possibly i'm unlucky.. or
just haven't read enough of the archives.

I'm trying to test an ASP.NET web app.. that has 3
frames.

I essentially, cannot get more than about 2% of anything to work haha. 

When I first start up.. if I do
ie.frame("detail").show_all_objects().. I get a bunch of stuff.

Now.. if I do ie.frame("header").link(:url,
/users/).click...   the page refreshes.. the detail frame is full of
stuff... I can view source and see the HTML.. button's etc... 

But now if I do ie.frame("detail"). anything.. doesn't matter..
.links .buttons .text_fields... I get nothing back.. ever.

Is it well known that it is impossible to test dynamically generated ASP.NET stuff with Watir?  (that being said,
every execution, every time, yields identical HTML in view source).

Thanks,
Roger



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.11/493 - Release Date: 10/23/2006








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.11/497 - Release Date: 10/25/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] unable to use Click_no_wait on buttons inside a frame.

2006-10-02 Thread Alan Ark








Hi folks.

 

Using 

Ruby v. 1.8.5

Watir v. 1.5.1.1081

Windows XP pro.

 

 

Attaching my browser to “C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1081\unittests\html\frame_buttons.html”

 

I am having trouble using click_no_wait on buttons inside a
frame.

 

Inside irb:

irb(main):019:0>
ie.frame("buttonFrame").button(:name,"b1").click

=> nil   

irb(main):020:0>
ie.frame("buttonFrame").button(:name,"b1").click_no_wait

NoMethodError: undefined method `to_identifier' for
nil:NilClass

    from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1250:in
`to_identifier'

    from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1231:in
`eval_in_spawned_process'

    from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2515:in
`click_no_wait'

    from (irb):20

    from :0

 

 

While I consider myself a Ruby user, I am certainly not a
Ruby programmer, but I’m trying to learn a little more about it.

 

I’m looking for ideas on what can I do to workaround/patch
this problem.

 

Thanks

-Alan

 







Alan
Ark | Lead QA Engineer | Complí | [EMAIL PROTECTED] | office: 503.294.2020 | fax: 503.294.1200 | www.compli.com


 








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.9/458 - Release Date: 9/27/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Inputing text into a that is containedwithin a

2006-09-29 Thread Alan Ark








Just a FWIW.

 

I gave up on trying to use Watir to input
things into my WYSIWYG editor.

Now I use AutoIt to do it.

 

I’m still going to see if I can get
Watir to interact with it directly.  There is a _javascript_ API available for
FreeTextBox, but first, I’ll need to be able to grab the object handle –
which is in itself a challenge right now.

 

-Alan

 

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Howard (Intern)
Sent: Thursday, September 07, 2006
11:31 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Inputing
text into a  that is containedwithin a 



 

Hi, 

   
I’m having a lot of trouble trying to get Watir to input text into a
 that is within a , I have tried a lot of things,
such as 

 

ie.divs(:class,
"CommonFormField" ).set('watir')

 

and a ton of variations to
that. I am totally out of ideas.

 

 

From what I know, the box
is know as a WYSIWYG editor, and the box has buttons on top that look like
these.

 



 

Any help would be greatly appreciated.

 

 

-Ryan Howard

Intern: Systems Testing & Automation

»telligentsystems 
Exceptional Service. Predictable
Results.
www.telligent.com

email: [EMAIL PROTECTED]

 








--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 9/6/2006
 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006
 

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

Re: [Wtr-general] watirmaker unsupported DEBUG statements

2006-09-29 Thread Alan Ark
Hi Matthew.

Unfortunately, there is not much support for WatirMaker.  

The best thing to do is create the scripts you need by hand.  While this 
involves knowing HTML, its probably safer to go this route, as watir will only 
do what you tell it to do.

FWIW
When I took a look at WatirMaker in the past, I noticed that it used a lot of 
ie.goto statements when a new page was to be accessed.  This in itself made me 
want to put WatirMaker away for a while.

Good luck
-Alan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Hailstone
Sent: Friday, September 29, 2006 1:16 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] watirmaker unsupported DEBUG statements

What I do:
1 - Goto calendar URL
2 - Click on a time on a day
3 - Name the event and click on "Create Event"
4 - Click on the newly created event
5 - Click on the "Options" menu on the right side

Results:
Get an error page

6 - Close the browser, and view the output of watirmaker

I'm trying to automate some stuff at work on a web app, and I get
similar statements. I wanted to reproduce some where accessible to
everyone, so I chose Google Calendar.

Here is the output of the watirmaker.rb script:


##//
##
## Watir script recorded by WatirMaker.
##
##//

#requires
require 'watir'

#includes
include Watir

ie = IE.new

ie.goto( 'http://www.google.com/calendar' )
# DEBUG: Unsupported onfocusout tagname BODY (:index, '8')
ie.text_field( :id, 'Email' ).set( USERNAME )
ie.text_field( :id, 'Passwd' ).set( PASSWORD )
ie.checkbox( :name, 'PersistentCookie' ).clear
ie.button( :name, 'null' ).click
# DEBUG: Unsupported onfocusout tagname HTML (:index, '0')
# DEBUG: Unsupported onfocusout tagname HTML (:index, '1')
unknown property or method `document'
HRESULT error code:0x80020006
  Unknown name.
# DEBUG: Unsupported onfocusout tagname BODY (:index, '11')
# DEBUG: Unsupported onclick tagname DIV (:id, 'r30')
# DEBUG: Unsupported onfocusout tagname DIV (:id, 'r30')
ie.text_field( :id, 'dragEventSubject' ).set( 'Test Event' )
ie.document.all[ '730' ].click
# DEBUG: Unsupported onfocusout INPUT type button
# DEBUG: Unsupported onfocusout tagname BODY (:index, '11')
# DEBUG: Unsupported onfocusout tagname DIV (:index, '660')
unknown property or method `document'
HRESULT error code:0x80020006
  Unknown name.
# DEBUG: Unsupported onfocusout tagname TD (:id, 'maincell')
ie.document.all[ '906' ].click
# DEBUG: Unsupported onfocusout tagname HTML (:index, '1')
# DEBUG: Unsupported onfocusout tagname BODY (:index, '6')


Any help would be greatly appreciated. :)

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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] detecting button as disabled or enabled

2006-09-28 Thread Alan Ark








Not sure where you were looking in the
documentation, but I’m pretty sure that “disabled?”  is a
method available on buttons. 

 

Maybe something like 

 

ie.button(:text,”ReadMe”).disabled?


 

might work.

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Munns
Sent: Thursday, September 28, 2006
10:22 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] detecting
button as disabled or enabled



 

With ruby/watir, is there a way to detect if a button has
been disabled?








--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006
 

  

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general]

2006-09-26 Thread Alan Ark








Hi Luke.

 

What types of things did you try?

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Luke
Sent: Tuesday, September 26, 2006
6:29 AM
To: wtr-general
Subject: [Wtr-general] 



 

can you help, how can I
access to such element?

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/456 - Release Date: 9/25/2006








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/456 - Release Date: 9/25/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Problem with element_by_xpath?

2006-09-20 Thread Alan Ark
Hi folks.

I was using the element_by_xpath to try to interact with "FreeTextBox" (FTB). 
FTB is a ASP.NET component that allows users to do some online editing.  
Supposedly there is an interface that I can use to interact with it, and I 
wanted to see if I actually could in my own clumsy way.

I consider FTB to be my nemesis.  I know I can get it to work... just finding 
out the "how".  Its been quite a journey, and I'm getting closer all the time. 

LOL.

Thanks
-Alan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Tuesday, September 19, 2006 8:21 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Problem with element_by_xpath?

Angrez, Do you consider element_by_xpath to be part of the published 
API? I didn't see it that way.

Alan, can you explain why you are using element_by_xpath instead of, 
say, ie.text_field(:xpath, "blah")?

Bret

Alan Ark wrote:
>
> Hi Angrez.
>
> Ahhh.. yes I used the wrong Xpath query. I'll double check that from 
> now on.
>
> One thing that would help me is a unittest that specifically exercises 
> the element_by_xpath call. I didn't find one with the Watir 1081 gem 
> install. Maybe you have one lying around somewhere?
>
> I'm still getting the same error (from original message) with the call 
> on my machine though.
>
> REXML::ParseException.
>
> I ran the unittests for REXML, and they mainly passed. (The ones that 
> failed appear to be missing the test files in the REXML 3.1.5 
> distribution).
>
> I'm going to have to investigate this a little more on my end.
>
> Thanks
>
> -Alan
>
> 
>
> *From:* [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] *On Behalf Of *Angrez Singh
> *Sent:* Monday, September 18, 2006 10:38 PM
> *To:* wtr-general@rubyforge.org
> *Subject:* Re: [Wtr-general] Problem with element_by_xpath?
>
> Hi Alan,
>
> The way you are using XPath query is not the correct way. You can take 
> the help of this tutorial to write correct XPath expression:
> http://www.w3schools.com/xpath/default.asp 
> <http://www.w3schools.com/xpath/default.asp>
>
> In your case the correct XPath expression would be:
> element = ie.element_by_xpath("//[EMAIL PROTECTED]'q']")
>
> First you should use the tag names that are visible on the HTML source 
> and not the tagnames that are supplied by watir. Like you should have 
> used 'input' instead of 'text_field' which is watir specific. Also you 
> should gives quotes(single or double) while giving the selection 
> criteria.
>
> The above code works for me. Let me know if you still have any problems.
>
> - Angrez
>
> On 9/16/06, *Alan Ark* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> 
> wrote:
>
> Hi folks.
>
> I am having a problem getting element_by_xpath to work cleanly.
>
> Windoze XP pro
>
> Ruby 1.8.5 - One click installer.
>
> Watir 1.5.1.1081 - gem install
>
> Rexml 3.1.5
>
> I've attached by browser to google.com <http://google.com> .
>
> From irb :
>
> elem=ie.element_by_xpath("//[EMAIL PROTECTED]")
>
> returns
>
> REXML::ParseException: #
>
> ...
>
> 
>
> Line:
>
> Position:
>
> Last 80 unconsumed characters:
>
>   link="#cc" bgCo
>
> from c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:89:in 
> `parse'
>
> from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:190:in `build'
>
> from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:45:in `initialize'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in `new'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in 
> `create_rexml_document_object'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1972:in 
> `rexml_document_object'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2174:in 
> `elements_by_xpath'
>
> from 
> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2167:in 
> `element_by_xpath'
>
> Should I try a different Watir gem version? Other suggestions?
>
> Thanks
>
> -Alan
>
> 
>
> *Alan Ark* * |* **Lead QA Engineer |** ** Complí** ** |  
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> |** **office: ** 
> 503.294.2020 *|* * fax:* 503.294.1200 **|** www.compli.co m 
> <http://www.compli.com/>
>
> --
> No virus found in this ou

Re: [Wtr-general] frame.contains_text missing with gem build 1081?

2006-09-20 Thread Alan Ark
Hey Bret.

I've logged the issue in Jira.  Thanks for confirming that this was indeed a 
problem.  Also thanks for the workaround.  I was using html.include?  I like 
using text better.  After thinking about it, I'm disappointed that I wasn't 
thinking about using "text" to workaround the "contains_text" issue.  LOL

Regards
-Alan


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Tuesday, September 19, 2006 8:26 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] frame.contains_text missing with gem build 1081?

Please log this as a regression bug in Jira.

Workaround is
ie.frame("top").text.include? "there"

Bret

Alan Ark wrote:
>
> Hi folks.
>
> Environment:
> Windoze XP pro
> Ruby 1.8.5 - One click installer.
> Watir 1.5.1.1081 - gem install
>
> I was looking at a page that contains frames, and I had some trouble 
> using the following command under irb:
>
> ie.frame("top").contains_text("there") -> undef'd method "contains_text"
>
> Then issuing
>
> ie.frame("top").public_methods
>
> It appears that contains_text is no longer available as a public 
> method to a frame.
>
> I'm going to see if I can come up with a different way to verify my 
> results page, but I thought that someone might have some insight on 
> this one.
>
> Thanks
>
> -Alan
>
> example HTML to create the frameset:
>
> Source of frameset
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
> Source of a frame content file
>
> 
>
> Hello there
>
> 
>
> 
>
> *Alan Ark* *|* **Lead QA Engineer |** **Complí** **| 
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> |** **office:** 
> 503.294.2020 *|* *fax:* 503.294.1200 **|** www.compli.com 
> <http://www.compli.com/>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
>
> 
>
> ___
> 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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/451 - Release Date: 9/19/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] frame.contains_text missing with gem build 1081?

2006-09-19 Thread Alan Ark








Hi folks.

 

Environment:
Windoze XP pro
Ruby 1.8.5 – One click installer.
Watir 1.5.1.1081 – gem install

 

I was looking at a page that contains frames, and I had some
trouble using the following command under irb:

 

ie.frame("top").contains_text("there") 
-> undef’d method “contains_text”

 

Then issuing 

 

ie.frame(“top”).public_methods

 

It appears that contains_text is no longer available as a
public method to a frame.

 

I’m going to see if I can come up with a different way
to verify my results page, but I thought that someone might have some insight
on this one.

 

Thanks

-Alan

 

 

example HTML to create the frameset:

 

Source of frameset













 

Source of a frame content file



Hello there



 







Alan
Ark | Lead QA Engineer | Complí | [EMAIL PROTECTED] | office: 503.294.2020 | fax: 503.294.1200 | www.compli.com


 








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Problem with element_by_xpath?

2006-09-19 Thread Alan Ark









Hi Angrez.

 

Ahhh.. yes I used the wrong Xpath query. 
I’ll double check that from now on.

 

One thing that would help me is a unittest
that specifically exercises the element_by_xpath call.  I didn’t find one with the
Watir 1081 gem install.  Maybe you have one lying around somewhere?

 

I’m still getting the same error (from
original message) with the call on my machine though.

REXML::ParseException.

 

I ran the unittests for REXML, and they
mainly passed.  (The ones that failed appear to be missing the test files in
the REXML 3.1.5 distribution).

 

I’m going to have to investigate this a
little more on my end.  

 

Thanks

-Alan

 

 

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angrez Singh
Sent: Monday, September 18, 2006
10:38 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Problem
with element_by_xpath?



 

Hi Alan,

The way you are using XPath query is not the correct way. You can take the help
of this tutorial to write correct XPath _expression_:
http://www.w3schools.com/xpath/default.asp


In your case the correct XPath _expression_ would be:
element = ie.element_by_xpath("//[EMAIL PROTECTED]'q']")

First you should use the tag names that are visible on the HTML source and not
the tagnames that are supplied by watir. Like you should have used 'input'
instead of 'text_field' which is watir specific. Also you should gives
quotes(single or double) while giving the selection criteria. 

The above code works for me. Let me know if you still have any problems.

- Angrez





On 9/16/06, Alan Ark
< [EMAIL PROTECTED]> wrote:







Hi
folks.

 

I
am having a problem getting element_by_xpath to work cleanly.

 

Windoze
XP pro

Ruby
1.8.5 – One click installer.

Watir
1.5.1.1081 – gem install

Rexml
3.1.5 

 

I've
attached by browser to google.com
.

 

From
irb :

elem=ie.element_by_xpath("//[EMAIL PROTECTED]")

 

returns

REXML::ParseException:
#….

…



Line:

Position:

Last
80 unconsumed characters:

 


   
from c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:89:in `parse'

   
from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:190:in `build'

   
from c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:45:in `initialize'

   
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in `new'

   
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in
`create_rexml_document_object'

   
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1972:in
`rexml_document_object'

   
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2174:in
`elements_by_xpath'

   
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2167:in
`element_by_xpath'

 

Should
I try a different Watir gem version?  Other suggestions?

 

Thanks

-Alan

 







Alan Ark  | Lead
QA Engineer  |  
Complí  | 
[EMAIL PROTECTED] |  office:   503.294.2020 |   fax:  503.294.1200 |   www.compli.co
m 

 





 

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/448 - Release Date: 9/14/2006




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



 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 9/15/2006








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Disclaimer

2006-09-19 Thread Alan Ark
I think that this is reasonable.  People should be aware that nothing come free 
out of the box with Watir.  The richer the background, the more one can reap 
from it.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Monday, September 18, 2006 4:58 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Disclaimer

Based on recent feedback, i am thinking that we need to add the 
following information to the main Watir webpage at wtr.rubyforge.org:

  Watir 1.5 is currently under active development.
  However, it remains poorly documented. Users often have to read 
through a confusing email archive to find solutions to common problems. 
They also should understand HTML.
  Although developers understand it easily enough, testers are often 
confused and frustrated by it.
  If you decide to use it anyway, you've been warned. Don't complain to 
us about it.
 
Comments please. I'm not joking.

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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date: 9/15/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Problem with element_by_xpath?

2006-09-15 Thread Alan Ark








Hi folks.

 

I am having a problem getting element_by_xpath to work
cleanly.

 

Windoze XP pro

Ruby 1.8.5 – One click installer.

Watir 1.5.1.1081 – gem install

Rexml 3.1.5 

 

I’ve attached by browser to google.com.

 

From irb :

elem=ie.element_by_xpath("//[EMAIL PROTECTED]")

 

returns

REXML::ParseException: #….

…



Line:

Position:

Last 80 unconsumed characters:

  

    from
c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:89:in `parse'

    from
c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:190:in `build'

    from
c:/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:45:in `initialize'

    from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in `new'

    from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1990:in
`create_rexml_document_object'

    from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:1972:in
`rexml_document_object'

    from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2174:in
`elements_by_xpath'

    from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1081/./Watir.rb:2167:in
`element_by_xpath'

 

Should I try a different Watir gem version?  Other
suggestions?

 

Thanks

-Alan

 







Alan
Ark | Lead QA Engineer | Complí | [EMAIL PROTECTED] | office: 503.294.2020 | fax: 503.294.1200 | www.compli.com


 








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/448 - Release Date: 9/14/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Inputing text into a that is containedwithin a

2006-09-07 Thread Alan Ark








Hey there.

 

Your editor looks similar to “FreeTextBox”
which I was looking to test against.

 

I had no luck in my investigations, but I
have also been pretty busy with other things lately.

 

One thing that I was going to try is ask
around to see if one of the developers could interact with the editor using
_vbscript_.  Usually, if it can be modified successfully in _vbscript_, finding the
Ruby way isn’t that far of a reach.

 

Just a though.

-Alan

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Howard (Intern)
Sent: Thursday, September 07, 2006
11:31 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Inputing
text into a  that is containedwithin a 



 

Hi, 

   
I’m having a lot of trouble trying to get Watir to input text into a
 that is within a , I have tried a lot of things,
such as 

 

ie.divs(:class,
"CommonFormField" ).set('watir')

 

and a ton of variations to
that. I am totally out of ideas.

 

 

From what I know, the box
is know as a WYSIWYG editor, and the box has buttons on top that look like
these.

 



 

Any help would be greatly appreciated.

 

 

-Ryan Howard

Intern: Systems Testing & Automation

»telligentsystems 
Exceptional Service. Predictable
Results.
www.telligent.com

email: [EMAIL PROTECTED]

 








--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 9/6/2006
 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.1/440 - Release Date: 9/6/2006
 

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

Re: [Wtr-general] Project Map

2006-07-28 Thread Alan Ark








Hey Bret.

 

Thanks for this information.  I know that
as a recent addition to the mailing list, I had some of my questions answered
by this email.

 

Have a great weekend and thanks for all
the hard work!

-Alan

 

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Friday, July 28, 2006 12:15
PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Project Map



 

I just posted this to my
blog. I'd been getting several emails from people who were wondering whether
the project had been abandoned.

http://www.io.com/~wazmo/blog/archives/2006_07.html#000240


Watir 1.5 is Under Active Development

Many observers have wondered whether Watir is still being
developed. If you look at our Rubyforge site, you'll see that our
"last release":
http://rubyforge.org/frs/?group_id=104&release_id=2725
was August 2005 and our "last code
changes":http://wtr.rubyforge.org/statcvs/commit_log.htm
) were made in
February of this year. But actually, Watir is under active
development. We've moved our source repository and many of the other
project resources over to our "new home at
OpenQA.org": http://openqa.org/watir/.
Things are spread out right now,
and it's somewhat confusing. Here is a map for where to find the most
current information about our project.

*Home Pages.* Our "home page at Rubyforge": http://wtr.rubyforge.org is still
the best place for new users to start. It describes the latest fully supported,
fully documented version of Watir (namely 1.4.1). Our "home page at 
OpenQA":http://www.openqa.org/watir
links to the project resources
at our new home. And our "wiki home page":http://wiki.openqa.org/projects/wtr 
is the best place to find the most recent information about the project.

*Releases.* We are providing regular "development
releases":
http://wiki.openqa.org/display/WTR/Development+Builds (Ruby
gems) of the work in progress for Watir 1.5 at OpenQA. When 1.5
becomes ready for official release, it will be released at our
"existing Rubyforge location": http://rubyforge.org/projects/wtr/,
and
therefore available automatically when you "gem install watir".

*Mailing List & Support.* We continue to use the 
"wtr-general":http://rubyforge.org/mailman/listinfo/wtr-general
mailing list at Rubyforge as our primary discussion list. This is the
best place to ask your questions about Watir. You'll have to subscribe 
before you can post. The
"archives":http://rubyforge.org/mailman/listinfo/wtr-general
contain
answers to many common questions. OpenQA provides a "web-based 
forum":http://forums.openqa.org/forum.jspa?forumID=5&start=15,
but
this isn't monitored by as many people.

*Wiki & FAQ.* We have moved our 
"wiki":http://wiki.openqa.org/display/WTR/Project+Home
over to
OpenQA. This includes our
"FAQ":
http://wiki.openqa.org/display/WTR/FAQ, which is frequently
updated.

*Buglist.* We are now using "Jira":http://jira.openqa.org/browse/WTR
to track bugs and features at OpenQA. The "old trackers": http://rubyforge.org/tracker/?group_id=104
at Rubyforge
will be closed down soon.

*Source Repository.* We now use the "Subversion repository at
OpenQA": http://openqa.org/watir/cvs.action.
The "CVS repository at
Rubyforge":http://rubyforge.org/scm/?group_id=104
is no longer being
used.



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 7/27/2006








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 7/27/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] FreeTextBox & Watir

2006-07-28 Thread Alan Ark
I've got a line open with the author of FTB to see why this is.  When you 
include the free version of FTB, all you get is a DLL to link into your 
project.  I'm hoping that the author will be able to give me a little more 
insight into the pieces that are being displayed. 

I do know about the frame (there are actually two of them), but I'm unsure on 
why they are there, or how/if I should be able to actually set text on the 
fields.

For now I have a clumsy workaround - sleep for 15 seconds while I paste the 
text into the field.  Its frustrating that I could not do 

ie.text_area(:id,"ctl0_MainBody_PolicyHtmlEditor").set("hi")

on the object.  Grrr.  

Sometimes you win, sometimes you have to find the way around. LOL.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris McMahon
Sent: Thursday, July 27, 2006 1:38 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] FreeTextBox & Watir

On 7/25/06, Alan Ark <[EMAIL PROTECTED]> wrote:
> Well using ie.show_active has given me very interesting results.
>
> What I had expected to be my text_field to be active was something totally 
> different.
>
> => "HTML Document name=  
> id=ctl0_MainBody_PolicyHtmlEditor_designEditor
> src=about:blank innerText=\n"
> irb(main):305:0>
>
>
> Clicking on the various dropdown that let me choose the attributes of the 
> font displays what I expected - a series of select-one's
> Clicking on any of the font styling/formatting buttons (like Bold, 
> Strikethru, centered, left-justified) also returns the HTML document type.
>
> I'm going to play around with this a little more.  It is very interesting 
> though.


So it is.  You realize you have a frame or iframe there, right?
That's the "HTML Document" bit.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/401 - Release Date: 7/26/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/402 - Release Date: 7/27/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] FreeTextBox & Watir

2006-07-25 Thread Alan Ark
Well using ie.show_active has given me very interesting results.

What I had expected to be my text_field to be active was something totally 
different.

=> "HTML Document name=  
id=ctl0_MainBody_PolicyHtmlEditor_designEditor
src=about:blank innerText=\n"
irb(main):305:0>


Clicking on the various dropdown that let me choose the attributes of the font 
displays what I expected - a series of select-one's
Clicking on any of the font styling/formatting buttons (like Bold, Strikethru, 
centered, left-justified) also returns the HTML document type.

I'm going to play around with this a little more.  It is very interesting 
though.  

-Alan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Rogers
Sent: Tuesday, July 25, 2006 9:14 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] FreeTextBox & Watir

these things tend to intercept all the keystrokes too, so perhaps its harder 
than I orignally thought

If you click in it and then from irb do
ie.show_active

you should see some of the details about it.

If I get some time later today, I'll give it a go

Paul

- Original Message -
From: Alan Ark <[EMAIL PROTECTED]>
Date: Tuesday, July 25, 2006 10:04 am
Subject: Re: [Wtr-general] FreeTextBox & Watir

> Hi Paul,
> 
> Thanks for the suggestion.
> 
> We're using FreeTextBox in an Iframe, but when I try to access the 
> field, I'm getting 
> 
> WIN32OLERuntimeError: focus
>OLE error code:800A083E in htmlfile
>  Can't move focus to the control because it is invisible, not 
> enabled, or of a type that does not accept the focus.
> 
> I can read lots of attributes from the field (contents, name, id, 
> etc), but it does not appear that I am able to *set* any value for it.
> 
> So now I'm multitasking - tossing it to the list while I go 
> searching the world for the answer.  Wish me luck!
> 
> -Alan
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:wtr-general-
> [EMAIL PROTECTED] On Behalf Of Paul Rogers
> Sent: Monday, July 24, 2006 8:34 PM
> To: wtr-general@rubyforge.org
> Subject: Re: [Wtr-general] FreeTextBox & Watir
> 
> Ive never tried to test one, but Ive looked at similar things for 
> inclusion in some projects Ive been working on.
> 
> They are normally just a text area, so:
> 
> ie.text_field(:index,1).set('Hello, world")
> 
> should probably do it
> 
> Paul
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 
> 7/21/2006 
>  
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 
> 7/24/2006 
> ___
> 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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] FreeTextBox & Watir

2006-07-25 Thread Alan Ark
Hi Paul,

Thanks for the suggestion.

We're using FreeTextBox in an Iframe, but when I try to access the field, I'm 
getting 

WIN32OLERuntimeError: focus
OLE error code:800A083E in htmlfile
  Can't move focus to the control because it is invisible, not enabled, or 
of a type that does not accept the focus.

I can read lots of attributes from the field (contents, name, id, etc), but it 
does not appear that I am able to *set* any value for it.

So now I'm multitasking - tossing it to the list while I go searching the world 
for the answer.  Wish me luck!

-Alan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Rogers
Sent: Monday, July 24, 2006 8:34 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] FreeTextBox & Watir

Ive never tried to test one, but Ive looked at similar things for inclusion in 
some projects Ive been working on.

They are normally just a text area, so:

ie.text_field(:index,1).set('Hello, world")

should probably do it

Paul

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 7/21/2006
 
  

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] FreeTextBox & Watir

2006-07-24 Thread Alan Ark








Hi listfolks.

 

Has anyone had to try to test a page that
is using FreeTextBox?

 

www.freetextbox.com

 

I’d like to chat with you if you
have.

 

Thanks

-Alan

 








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 7/21/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] WIN32OLERuntimeError redux - innertext

2006-07-18 Thread Alan Ark








Hi guys.

 

Just wanted to report back to the list on
this issue.

 

What I had done:

Put watir/waiter into my 1.4.1 version of
watir.  I also had to update watir/exceptions.rb as well.

 

Initially I thought that was working, but
after running more tests, the error still appears once in a while.

 

 

The next suggestion was to upgrade my
Watir version to 1.5.  I’ll try this at a future time, but not at this moment.

 

Thanks for the suggestions.

-Alan

 

 

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Ark
Sent: Thursday, July 13, 2006 7:46
AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
WIN32OLERuntimeError redux - innertext



 

Thanks for the leads folks.

 

I’m busy with a new hire, but once I try
these ideas, I will report back to the list.

 

Much appreciated.

-Alan

 

 









From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Wednesday, July 12, 2006
5:20 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
WIN32OLERuntimeError redux - innertext



 

That confirms that it is
a synchronization problem. I think those useless calls are really the moral
equivalent of sleep statements.

Probably the cleanest and most reliable solution would be to use this after
your call to IE.attach:

  require 'watir/waiter'
  WATIR::Waiter.wait_until { $ie.some_element_i_know_should_be_there.exists?
}

Although this library is packaged with Watir 1.5, it is a separate file
(watir/waiter.rb) and can be used with 1.4 if you copy it over manually.

Bret



On 7/12/06, Rand
Thacker <[EMAIL PROTECTED]>
wrote: 



I've even run into
problems before where $ie.wait didn't seem to do the trick.  Usually it
was when the pages where doing a redirect or some other craziness that I hadn't
planned on. 

My workaround was to go ahead and do the $ie.wait, then I threw in some thing
like this: 
  xUselessVariable =
$ie.contains_text('it_would_never_contain_this_phrase')
  xUselessVariable =
$ie.contains_text('it_would_never_contain_this_phrase_either')
and just ignore the return values...  and do your actions/assertions after
this. 
I've did it twice because once helped, but didn't solve it everytime.

I'm not running into those issues anymore.

I know it's a hack, but it sure worked for me.  Hope it helps someone else
out there.



On 7/12/06, Bret
Pettichord < [EMAIL PROTECTED]> wrote:







 



Sounds like a synchronization problem. There was a known
synchronization problem with IE.attach in 1.4.1. That can be avoided if you
call wait after attach. Thus:









 

   
$ie=IE.attach(:title,/^Compli:/)









   
$ie.wait # add this line 









   
$ie.set_fast_speed()

   
navigateToInbox($ie)

 













But depending on what is
in navigateToInbox, i can't tell if that is the problem here.
Can you show the code in navigateToInbox?

And if this change fixes your problem, let us know. I'm wondering if we
shouldn't release this fix as 1.4.2.

Bret










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













-- 
"I am the most humble person in the world!" 




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



 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
 

  

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Welcome to the "Wtr-general" mailing list (Digestmode)

2006-07-17 Thread Alan Ark
I am not aware of any out of the box integration with any defect tracking/ RM 
tools, but that is not to say that it can't be done.

Since Watir is written in ruby, and you can pretty much do anything you want to 
in Ruby, it probably can be done.  But it will probably require some investment 
on your part to make it work.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muralidhar, M
Sent: Monday, July 17, 2006 9:35 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Welcome to the "Wtr-general" mailing list 
(Digestmode)

Hi,

I want to know if WATIR can be integrated with a defect tracking and a
requirement management tool? If so, please specify to which tools WATIR
can be integrated to.

Regards,

Murali

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 10:03 PM
To: Muralidhar, M
Subject: Welcome to the "Wtr-general" mailing list (Digest mode)

Welcome to the Wtr-general@rubyforge.org mailing list! Howdy - welcome
to the Web Testing with Ruby general mailing list.

To post to this list, send your email to:

  wtr-general@rubyforge.org

General information about the mailing list is at:

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

If you ever want to unsubscribe or change your options (eg, switch to
or from digest mode, change your password, etc.), visit your
subscription page at:

  http://rubyforge.org/mailman/options/wtr-general/m.muralidhar%40ps.net


You can also make such adjustments via email by sending a message to:

  [EMAIL PROTECTED]

with the word `help' in the subject or body (don't include the
quotes), and you will get back a message with instructions.

You must know your password to change your options (including changing
the password, itself) or to unsubscribe.  It is:

  $Murali99

Normally, Mailman will remind you of your rubyforge.org mailing list
passwords once every month, although you can disable this if you
prefer.  This reminder will also include instructions on how to
unsubscribe or change your account options.  There is also a button on
your options page that will email your current password to you.

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

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 7/14/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] WIN32OLERuntimeError redux - innertext

2006-07-13 Thread Alan Ark








Thanks for the leads folks.

 

I’m busy with a new hire, but once I
try these ideas, I will report back to the list.

 

Much appreciated.

-Alan

 

 









From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Bret Pettichord
Sent: Wednesday, July 12, 2006
5:20 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general]
WIN32OLERuntimeError redux - innertext



 

That confirms that it is
a synchronization problem. I think those useless calls are really the moral
equivalent of sleep statements.

Probably the cleanest and most reliable solution would be to use this after
your call to IE.attach:

  require 'watir/waiter'
  WATIR::Waiter.wait_until {
$ie.some_element_i_know_should_be_there.exists? }

Although this library is packaged with Watir 1.5, it is a separate file
(watir/waiter.rb) and can be used with 1.4 if you copy it over manually.

Bret





On 7/12/06, Rand Thacker
<[EMAIL PROTECTED]>
wrote: 



I've even run into
problems before where $ie.wait didn't seem to do the trick.  Usually it
was when the pages where doing a redirect or some other craziness that I hadn't
planned on. 

My workaround was to go ahead and do the $ie.wait, then I threw in some thing
like this: 
  xUselessVariable =
$ie.contains_text('it_would_never_contain_this_phrase')
  xUselessVariable = $ie.contains_text('it_would_never_contain_this_phrase_either')
and just ignore the return values...  and do your actions/assertions after
this. 
I've did it twice because once helped, but didn't solve it everytime.

I'm not running into those issues anymore.

I know it's a hack, but it sure worked for me.  Hope it helps someone else
out there.





On 7/12/06, Bret
Pettichord < [EMAIL PROTECTED]> wrote:







 



Sounds like a synchronization problem. There was a known synchronization
problem with IE.attach in 1.4.1. That can be avoided if you call wait after
attach. Thus:









 

   
$ie=IE.attach(:title,/^Compli:/)









   
$ie.wait # add this line 









   
$ie.set_fast_speed()

   
navigateToInbox($ie)

 













But depending on what is
in navigateToInbox, i can't tell if that is the problem here.
Can you show the code in navigateToInbox?

And if this change fixes your problem, let us know. I'm wondering if we
shouldn't release this fix as 1.4.2.

Bret










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











-- 
"I am the most humble person in the world!" 




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



 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/387 - Release Date: 7/12/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] WIN32OLERuntimeError redux - innertext

2006-07-12 Thread Alan Ark

    def teardown

    #close windows that might have
caused problems.

    closePrintWindows

 

    # Make sure that we are at the Inbox

    $ie=IE.attach(:title,/^Compli:/)

    $ie.set_fast_speed()

    navigateToInbox($ie)

    end

 

 

Method declaration for closePrintWindows

-

    def closePrintWindows

    # close all open ie windows

        all_closed = 'unknown'

        while (all_closed != 'yes')

    begin

    #use a
regexp that will match any title so all ie windows are forced closed

    header =
Regexp.new(/Compli: Print/)

    @ie = IE.attach(:title,
header)

    @ie.close

    

    # catch the
exception raised when there's now window to attach to.

        rescue
NoMatchingWindowFoundException

    all_closed =
'yes'

    end

    end

    end

 

Ideas, comments welcome.

-Alan

 







Alan Ark | Lead QA Engineer | Complí | [EMAIL PROTECTED] | office: 503.294.2020 | fax: 503.294.1200 | www.compli.com


 








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.10/385 - Release Date: 7/11/2006
 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general