[wtr-general] Re: problem with fill fields on a login page (maybe frame problem)

2009-04-27 Thread deralex

found myself via the Watir WebRecorder out the the right line is:

ie.frame(:index, 53).image(:index, 4).click

- so okay with
ie.show_frames { |t| puts t.to_s }
 i can identify the frame 53 but how i can see the image index?


On 27 Apr., 12:35, Alexander Fedtke alexander.fed...@googlemail.com
wrote:
 Thanks for tip i got the result.
 I just created a new user under windows and i qorks - strange so now i am
 using another user and the script works.

 But now i have the problem using the login button ( go button)

 i try as  src:

 # 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  text field.

 ie.frame(:name, frmEngineLogin).text_field(:id, inputUid).set testauto

 puts  Step 2.2: enter Password=123456.

 ie.frame(:name, frmEngineLogin).text_field(:id, inputPwd).set 123456

 puts  Step 3: Press Login Button 

 ie.frame(:name, frmEngineLogin).button(:src, /go/).click

 -
 i try as with the title

 ie.frame(:name, frmEngineLogin).button(:title, Login).click

 -
 Also not working-... any idea what i missing?

 Via the ie developers toolbar is see that it is the same frame as username
 and password. So what is missing?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[wtr-general] problem with fill fields on a login page (maybe frame problem)

2009-04-23 Thread deralex

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
-~--~~~~--~~--~--~---



[wtr-general] Re: problem with fill fields on a login page (maybe frame problem)

2009-04-23 Thread deralex

thanks for the fix it is runing on the pc of a friend but not on my pc
still got the error
CODE:
# 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.frame(:name, frmEngineLogin).text_field(:id, inputUid).set
testauto


ERROR Message:
ruby testgo3prestageframeapp.rb
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:40:in
`locate': Unable to locate a frame with name frmEngineLogin
(Watir::Exception::UnknownFrameException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:
47:in `initialize'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
container.rb:102:in `new'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
container.rb:102:in `frame'
from testgo3prestageframeapp.rb:17
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


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---