added code to click the ok button when you try to delete the previous installs
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3285 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -3,6 +3,29 @@ require 'watir'
|
|||||||
#email stuff
|
#email stuff
|
||||||
require 'net/smtp'
|
require 'net/smtp'
|
||||||
|
|
||||||
|
#used to handle javascript popups
|
||||||
|
require 'watir/contrib/enabled_popup'
|
||||||
|
require 'watir/WindowHelper'
|
||||||
|
#
|
||||||
|
# Method to handle javascript popups.
|
||||||
|
#
|
||||||
|
require 'thread'
|
||||||
|
#
|
||||||
|
require 'win32ole'
|
||||||
|
#
|
||||||
|
def startClicker( button , waitTime = 3)
|
||||||
|
w = WinClicker.new
|
||||||
|
longName = @@ie.dir.gsub("/" , "\\" )
|
||||||
|
shortName = w.getShortFileName(longName)
|
||||||
|
c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} "
|
||||||
|
puts "Starting #{c}"
|
||||||
|
w.winsystem(c)
|
||||||
|
w=nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#includes
|
#includes
|
||||||
include Watir
|
include Watir
|
||||||
@@ie = IE.new
|
@@ie = IE.new
|
||||||
@@ -88,6 +111,8 @@ begin
|
|||||||
@@ie.link(:title, 'Manage Export Repository').click
|
@@ie.link(:title, 'Manage Export Repository').click
|
||||||
@@ie.wait
|
@@ie.wait
|
||||||
@@ie.checkboxes.each { |c| c.set }
|
@@ie.checkboxes.each { |c| c.set }
|
||||||
|
#Click the annoying are you sure button that pops up
|
||||||
|
startClicker("OK", 1)
|
||||||
@@ie.button(:value, 'Delete Checked').click
|
@@ie.button(:value, 'Delete Checked').click
|
||||||
@@ie.wait
|
@@ie.wait
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user