Hi i just started with Watir and i not even can login:

The page which i want to acess is:
https://www.go3-stage.engelvoelkers.com/dGPS3.pre/default.jsp

I want to fill Login & PW and click on GO

Here my script approach:

------------------------------------------------------------------------------------------------------------------
# the Watir controller
require "watir"

# set a variable
test_site = "https://www.go3-stage.engelvoelkers.com/dGPS3.pre/
default.jsp"

# open the IE browser
ie = Watir::IE.new

# print some comments
puts "Beginning of test: Google search."

puts " Step 1: go to the test site: " + test_site
ie.goto test_site

puts " Step 2.1: enter 'login=testauto' in the search text field."
ie.text_field(:name, "uid").set "testauto" # "q" is the name of the
search field

puts " Step 2.2: enter 'pw=123456' in the search text field."
ie.text_field(:name, "Pwd").set "123456" # "q" is the name of the
search field

puts " Step 3: click the 'loginbutton' button."
ie.button(:name, "Login").click # "btnG" is the name of the Search
button

puts " Expected Result:"
puts "  Login into PRESTAGE with testauto"

puts " Actual Result:"
if ie.text.include? "Programming Ruby"
  puts "  Test Passed. Found the test string: 'Programming Ruby'.
Actual Results match Expected Results."
else
  puts "  Test Failed! Could not find: 'Programming Ruby'."
end
puts "End of test: PRESTAGE Login."


------------------------------------------------------------------------------------------------------------------
-- The Problem start with the first field "Username"
Here the error message:

>ruby testgo3prestage.rb
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :name,
"uid" (Watir::Exception::UnknownObjectException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
284:in `enabled?'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
56:in `assert_enabled'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:323:in `set'
        from testgo3prestage.rb:28
Beginning of test: Google search.
 Step 1: go to the test site: 
https://www.go3-stage.engelvoelkers.com/dGPS3.pre/default.jsp
 Step 2.1: enter 'login=testauto' in the search text field.
>Exit code: 1


------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
== Can someone help me and adjust my script. I think i have a frame
problem but IE developer toolbar do not help me with this.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to