[wtr-general] Re: Security Alert pop-up code is not working at all

2009-07-21 Thread Tony

Hi Dheeraj,

Forgot to add the outval variable before the begin in wait.
Have updated the code, please try changing the code again.
Let me know if you run into any other issues.

Thanks,
Tony

On Jul 21, 9:51 am, Dheeraj Gambhir checktestingthi...@gmail.com
wrote:
 Hi,

 I tried my code by replacing goto, wait in in
 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb file with
 the code given in  http://wiki.openqa.org/display/WTR/Security+Alerts, but
 it is giving the following error now:

 C:\Program Files\Watir\examplesruby finalcount.rb
 Launched the global pop-up handler
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:480:in
 `wait':
 undefined local variable or method `outval' for #Watir::IE:0x321d40c
 (NameErro
 r)
         from
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:35
 9:in `goto'
         from finalcount.rb:48

 Regards
 Dheeraj Gambhir

 On Mon, Jul 20, 2009 at 9:42 PM, Tony ynot...@gmail.com wrote:

  Hi Dheeraj,

  Modifiedhttp://wiki.openqa.org/display/WTR/Security+Alertsto handle
  these popups.
  Note: you would have to change the code in ie_class.rb files for this.
  No changes or extra steps is required in your testcase. The popups yes
  button will be clicked automatically.

  Thanks,
  Tony
--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-21 Thread Dheeraj Gambhir
Thanks a lot dude, u rock
Its working perfectly fine.

Regards
D G

On Tue, Jul 21, 2009 at 11:32 AM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Forgot to add the outval variable before the begin in wait.
 Have updated the code, please try changing the code again.
 Let me know if you run into any other issues.

 Thanks,
 Tony

 On Jul 21, 9:51 am, Dheeraj Gambhir checktestingthi...@gmail.com
 wrote:
  Hi,
 
  I tried my code by replacing goto, wait in in
  C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb file
 with
  the code given in  http://wiki.openqa.org/display/WTR/Security+Alerts,
 but
  it is giving the following error now:
 
  C:\Program Files\Watir\examplesruby finalcount.rb
  Launched the global pop-up handler
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:480:in
  `wait':
  undefined local variable or method `outval' for #Watir::IE:0x321d40c
  (NameErro
  r)
  from
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:35
  9:in `goto'
  from finalcount.rb:48
 
  Regards
  Dheeraj Gambhir
 
  On Mon, Jul 20, 2009 at 9:42 PM, Tony ynot...@gmail.com wrote:
 
   Hi Dheeraj,
 
   Modifiedhttp://wiki.openqa.org/display/WTR/Security+Alertsto handle
   these popups.
   Note: you would have to change the code in ie_class.rb files for this.
   No changes or extra steps is required in your testcase. The popups yes
   button will be clicked automatically.
 
   Thanks,
   Tony
 


--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-21 Thread Dheeraj Gambhir
Is there any command to get text from web page like my requirement is to get
order-no from thank you page.

Regards
D G

On Tue, Jul 21, 2009 at 12:32 PM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 Thanks a lot dude, u rock
 Its working perfectly fine.

 Regards
 D G


 On Tue, Jul 21, 2009 at 11:32 AM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Forgot to add the outval variable before the begin in wait.
 Have updated the code, please try changing the code again.
 Let me know if you run into any other issues.

 Thanks,
 Tony

 On Jul 21, 9:51 am, Dheeraj Gambhir checktestingthi...@gmail.com
 wrote:
  Hi,
 
  I tried my code by replacing goto, wait in in
  C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb file
 with
  the code given in  http://wiki.openqa.org/display/WTR/Security+Alerts,
 but
  it is giving the following error now:
 
  C:\Program Files\Watir\examplesruby finalcount.rb
  Launched the global pop-up handler
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:480:in
  `wait':
  undefined local variable or method `outval' for #Watir::IE:0x321d40c
  (NameErro
  r)
  from
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:35
  9:in `goto'
  from finalcount.rb:48
 
  Regards
  Dheeraj Gambhir
 
  On Mon, Jul 20, 2009 at 9:42 PM, Tony ynot...@gmail.com wrote:
 
   Hi Dheeraj,
 
   Modifiedhttp://wiki.openqa.org/display/WTR/Security+Alertsto handle
   these popups.
   Note: you would have to change the code in ie_class.rb files for this.
   No changes or extra steps is required in your testcase. The popups yes
   button will be clicked automatically.
 
   Thanks,
   Tony
 



--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-21 Thread Chuck van der Linden

On Jul 21, 12:12 am, Dheeraj Gambhir checktestingthi...@gmail.com
wrote:
 Is there any command to get text from web page like my requirement is to get
 order-no from thank you page.


Please search the group for an answer first, I'm pretty sure this
topic has been covered.  If you dont' find an answer then please
following the posting guidelines presented on the main page for
discussions, which includes such things as:
 * don't ask new questions in an unrelated thread
 * tell us what you've tried, and specifically what results you got
(e.g. error details etc, not just 'it didn't work'.. tell us HOW it
didn't work)
--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-20 Thread Željko Filipin
On Mon, Jul 20, 2009 at 11:34 AM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:
 whenever i goto the login
 page it throws me a security alert popup

Take a look:

http://wiki.openqa.org/display/WTR/Pop+Ups
http://wiki.openqa.org/display/WTR/Security+Alerts

Željko
--
http://watirpodcast.com/

--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-20 Thread Dheeraj Gambhir

It is not working yet, i have tried all the given below methods in
code:
**
require 'rubygems'
require 'watir'
require 'win32ole'


  ie = Watir::IE.new
  ie.goto('http://qa2.mlb.com/enterworkflow.do?
flowId=sb_purchasebrand=cle_scoreboardwfClub=cle')
  puts Security Alert must be in the way. Click to bypass
  autoit.WinActivate( Security Alert, )
  autoit.Send( (TAB))
  autoit.Send( (TAB))
  autoit.Send( (Enter))

   autoit.ControlClick(Microsoft Internet Explorer,'', 'OK')
   autoit.ControlClick(Security Information,'', 'Yes')
   autoit.ControlClick(Security Alert,'', 'Yes')
   sleep(5)

   **


#
#
#includes
   require 'watir'   # the controller
   require 'win32ole'
   # set a variable
   test_site = 'http://qa2.mlb.com/enterworkflow.do?
flowId=sb_purchasebrand=cle_scoreboardwfClub=cle'

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

   # print some comments
   puts ## Beginning of test: Form Submission
   puts   

   puts Step 1: go to the test site:  + test_site
   a = Thread.new {
   ie.goto(test_site)
   }
   ie.send_keys('{TAB}')
   ie.send_keys('{TAB}')
   ie.send_keys('{ENTER}')
   a.join
   puts   Action: entered  + test_site +  in the address bar.
   puts   
   puts Step 2: enter 'dheeraj.gamb...@tavant.com' in the
emailAddress text field
   ie.text_field(:name, emailAddress).set
(dheeraj.gamb...@tavant.com)
   puts   Action: entered dheeraj.gamb...@tavant.com in the
emailAddress field
   puts   
   puts Step 3: enter 'dheeraj' in the password text field
   ie.text_field(:name, password).set(dheeraj)
   puts   Action: entered dheeraj in the password field
   puts   
   puts Step 4: click the 'Login' button
   ie.button(:value, Login).click
   puts   Action: clicked the Login button.
   if ie.contains_text(September)
  puts Test Passed. Found the test string: 'September'. Actual
Results match Expected Results.
   else
  puts Test Failed! Could not find: 'September'
   end

   puts   
   ie.link(:text, September).click



***



On Jul 20, 2:46 pm, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Mon, Jul 20, 2009 at 11:34 AM, Dheeraj Gambhir 

 checktestingthi...@gmail.com wrote:
  whenever i goto the login
  page it throws me a security alert popup

 Take a look:

 http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/display/WTR/Security+Alerts

 Željko
 --http://watirpodcast.com/
--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-20 Thread Dheeraj Gambhir

I tried this also, but all in vain:

require 'rubygems'
require 'watir'
require 'win32ole'
require 'watir/ie'
require 'watir\contrib\enabled_popup'

def startClicker(button , waitTime= 9, user_input=Yes)
hwnd = $ie.enabled_popup(waitTime)
 if(hwnd)
 w = WinClicker.new
if(user_input)
 w.setTextValueForFileNameField( hwnd, Yes)
end
 sleep 3
 w.clickWindowsButton_hwnd( hwnd, Yes )
 w=nil
 end
end
ie = Watir::IE.new
ie.goto('http://qa2.mlb.com/enterworkflow.do?
flowId=sb_purchasebrand=cle_scoreboardwfClub=cle')





It is not clickingYes button of security alert pop-up.

Please help me out.


Regards
D G



On Jul 20, 3:58 pm, Dheeraj Gambhir checktestingthi...@gmail.com
wrote:
 It is not working yet, i have tried all the given below methods in
 code:
 **
 require 'rubygems'
 require 'watir'
 require 'win32ole'

   ie = Watir::IE.new
   ie.goto('http://qa2.mlb.com/enterworkflow.do?
 flowId=sb_purchasebrand=cle_scoreboardwfClub=cle')
   puts Security Alert must be in the way. Click to bypass
   autoit.WinActivate( Security Alert, )
   autoit.Send( (TAB))
   autoit.Send( (TAB))
   autoit.Send( (Enter))

    autoit.ControlClick(Microsoft Internet Explorer,'', 'OK')
    autoit.ControlClick(Security Information,'', 'Yes')
    autoit.ControlClick(Security Alert,'', 'Yes')
    sleep(5)

        **

 #
 #
 #includes
    require 'watir'   # the controller
    require 'win32ole'
    # set a variable
    test_site = 'http://qa2.mlb.com/enterworkflow.do?
 flowId=sb_purchasebrand=cle_scoreboardwfClub=cle'

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

    # print some comments
    puts ## Beginning of test: Form Submission
    puts   

    puts Step 1: go to the test site:  + test_site
    a = Thread.new {
    ie.goto(test_site)
    }
    ie.send_keys('{TAB}')
    ie.send_keys('{TAB}')
    ie.send_keys('{ENTER}')
    a.join
    puts   Action: entered  + test_site +  in the address bar.
    puts   
    puts Step 2: enter 'dheeraj.gamb...@tavant.com' in the
 emailAddress text field
    ie.text_field(:name, emailAddress).set
 (dheeraj.gamb...@tavant.com)
    puts   Action: entered dheeraj.gamb...@tavant.com in the
 emailAddress field
    puts   
    puts Step 3: enter 'dheeraj' in the password text field
    ie.text_field(:name, password).set(dheeraj)
    puts   Action: entered dheeraj in the password field
    puts   
    puts Step 4: click the 'Login' button
    ie.button(:value, Login).click
    puts   Action: clicked the Login button.
    if ie.contains_text(September)
       puts Test Passed. Found the test string: 'September'. Actual
 Results match Expected Results.
    else
       puts Test Failed! Could not find: 'September'
    end

    puts   
    ie.link(:text, September).click

 ***

 On Jul 20, 2:46 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:

  On Mon, Jul 20, 2009 at 11:34 AM, Dheeraj Gambhir 

  checktestingthi...@gmail.com wrote:
   whenever i goto the login
   page it throws me a security alert popup

  Take a look:

 http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/disp...

  Željko
  --http://watirpodcast.com/
--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-20 Thread Tony

Hi Dheeraj,

Modified http://wiki.openqa.org/display/WTR/Security+Alerts to handle
these popups.
Note: you would have to change the code in ie_class.rb files for this.
No changes or extra steps is required in your testcase. The popups yes
button will be clicked automatically.

Thanks,
Tony
--~--~-~--~~~---~--~~
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: Security Alert pop-up code is not working at all

2009-07-20 Thread Dheeraj Gambhir
Hi,

I tried my code by replacing goto, wait in in
C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb file with
the code given in  http://wiki.openqa.org/display/WTR/Security+Alerts, but
it is giving the following error now:

C:\Program Files\Watir\examplesruby finalcount.rb
Launched the global pop-up handler
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:480:in
`wait':
undefined local variable or method `outval' for #Watir::IE:0x321d40c
(NameErro
r)
from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:35
9:in `goto'
from finalcount.rb:48


Regards
Dheeraj Gambhir

On Mon, Jul 20, 2009 at 9:42 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Modified http://wiki.openqa.org/display/WTR/Security+Alerts to handle
 these popups.
 Note: you would have to change the code in ie_class.rb files for this.
 No changes or extra steps is required in your testcase. The popups yes
 button will be clicked automatically.

 Thanks,
 Tony
 


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