If the item you are looking for is always a check box then this should get
you what you want
id = ie.checkboxes[1].name
#do other things with id
-andy
----Original Message Follows----
From: "Frank Legarreta" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: [Wtr-general] Need help assigning/resolving variables in WATIR
Date: Wed, 24 May 2006 16:17:51 -0400
I am testing a web based document management system that assigns a unique
Document Id to each document upon creation. Unfortunately viewing source
on the page is not an option, but
ie.html does give me the html source, however, in one continuous string.
Executing ie.show_all_objects on the page after creating a new document
results in a list of about a dozen document records with their unique
document ids (below represents the first record):
Name=
Id=
Checkbox
Name=DOCID-EFG-123-0
Id=remove
Value=on
Alt=
Src=
Question: What would be the WATIR and/or RUBY syntax to get this 1st
occurrence of the Document Id (in this case DOCID-EFG-123-0) into a
variable called document-id and then back out to be used in subsequent
scripts that require the document-id as input?
Note: I was able to accomplish this using Selenium, but WATIR was more
versatile with things such as multiple pop-up window handling.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general