From e2278750101ae2aa8eb84aecddd82d5400fbe123 Mon Sep 17 00:00:00 2001 From: mullenm Date: Fri, 14 Dec 2007 09:54:32 +0000 Subject: [PATCH] added "password" field type finder git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2987 248e525c-4dfb-0310-94bc-949c084e9493 --- tests/getallobjectsonscreen.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/getallobjectsonscreen.rb b/tests/getallobjectsonscreen.rb index 9abf2b0..9b7d92d 100644 --- a/tests/getallobjectsonscreen.rb +++ b/tests/getallobjectsonscreen.rb @@ -6,7 +6,7 @@ include Watir # #Set the page you want WATIR to grab all the fields and buttons for here # -MYPAGE = "http://loordv01/pls/apex/f?p=102:32" +MYPAGE = "http://loordv01/pls/apex/f?p=102:101" @@ie = IE.new @@ie.maximize @@ -15,10 +15,10 @@ MYPAGE = "http://loordv01/pls/apex/f?p=102:32" @@ie.goto(MYPAGE) @@ie.wait -@@ie.text_field( :id, 'P101_USERNAME' ).set( 'advantica' ) -@@ie.text_field( :id, 'P101_PASSWORD' ).set( 'password' ) -@@ie.button(:id, "login").click -@@ie.wait +#@@ie.text_field( :id, 'P101_USERNAME' ).set( 'advantica' ) +#@@ie.text_field( :id, 'P101_PASSWORD' ).set( 'password' ) +#@@ie.button(:id, "login").click +#@@ie.wait #Get the ole object doc = @@ie.document @@ -55,6 +55,11 @@ begin davalue = n.invoke('id').to_s puts "assert(@@ie.text_field(:id,'"+davalue+"').exists?,'Could not find "+davalue+" file upload field')" i=i+1 + end + if n.invoke("type").to_s == 'password' + davalue = n.invoke('id').to_s + puts "assert(@@ie.text_field(:id,'"+davalue+"').exists?,'Could not find "+davalue+" file upload field')" + i=i+1 end rescue #if we invoke a type method that doesn't exist get the next element next