Hi David,Yes, you are right. it gave me access to all elements in page, as I was expecting.
However when the page has multiple frames, I have to qualify frames explicitly,
in order to access all the elements. e.g. $ie.frame(:name, 'mainFrame').text_fields.lengthThere is one more exception, I am not sure whether this is know issues or not, but I had to explicitly address the element I wanted to click on. Again its the pages
with multiple frames.
Please find attached the zip containing html pages.
Following is my ruby session with comments:
---------------
$ie.goto("file://E:/Me/Work/Temp/build/ReLogin.do.htm")
2.093
$ie.frame(:name, 'mainFrame').divs.length
15
$ie.frame(:name, 'mainFrame').div(:text, "Add DHCP Server").exists?
true
##exists? says the element is presetn, but clicking it does not help
$ie.frame(:name, 'mainFrame').div(:text, "Add DHCP Server").click
##neither it can flash it..just in case I thought it might...
$ie.frame(:name, 'mainFrame').div(:text, "Add DHCP Server").flash
##However following method access the expected element correctly
$ie.frame(:name, "mainFrame").table(:id, /tblMain/i).cells[1].div(:id,
'addusers').div(:text, "Add DHCP Server").click
Cannot find server or DNS Error$ie.frame(:name, "mainFrame").table(:id, /tblMain/i).cells[1].div(:id, 'addusers').div(:text, "Add DHCP Server").flash
------------- I have the work around, but I was expecting following to work. $ie.frame(:name, "mainFrame").div(:text, "Add DHCP Server").flash Thanks and Regards, Manish David Schmidt wrote:
Actually, that *is* supported. However, if you look a sample HTML <INPUT> element from a page I'm scraping you'll find a clue why that particular example didn't work:<INPUT id=SSNEntry_txtSpouseSSN style=\"WIDTH: 95px\" value=999 name=SSNEntry:txtSpouseSSN>For text_fields, the current text in the field is contained in the "value" attribute. Thus:ie.text_field( :value, 'xyz' ) Should work for you. David
build.rar
Description: Binary data
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
