Something odd here, or something foolish I simply miss;) [CODE] strTemp=browser.getEditbox(guiMap.getWindow('login').getObject('Login Editbox','','').getFysicalDescription()) strTemp2='[EMAIL PROTECTED]' if (strTemp.eql?(strTemp2)) puts('strings match') else puts('string does not match') end if (browser.getEditbox(guiMap.getWindow('login').getObject('Login Editbox','','').getFysicalDescription().eql?('[EMAIL PROTECTED]'))) puts('TESTCHECK: PASS correct value found in editbox') else puts('TESTCHECK: FAIL incorrect value found in editbox') end [/CODE]
The first if statement returns strings match. which is correct, as they indeed do match. However the 2nd if statement returns the following error: c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1104:in `locate_input_element': undefined method `m atches' for false:FalseClass (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1091:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1091:in `locate_input_element' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:3717:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:2412:in `assert_exists' from (eval):2:in `getContents' from ./Classes/CLBrowser.class.rb:338:in `getEditbox' The odd thing about it, is that ther same values are compared with eachother. Any ideas? _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general