Dashboard > Watir > ... > Pop Ups > Security Alerts
Watir Log In View a printable version of the current page.
Security Alerts
Added by Zeljko, last edited by Zeljko on Mar 20, 2008  (view change) show comment
Labels: 
(None)

Security Alerts

If the site you are testing uses https, but the certificate is not correct, you may see this dialog. An incorrect certificate can occur if you create and install your own certificates, or a real certificate has an expired date, or if there is some redirection happening behind the scenes.

Again, this is really difficult to do a working demo for.

How do I access a security alert window?

Here is an example of clicking 'yes' on a security window when accessing a site:

class Browser
  def initialize
    $ie = Watir::IE.new
  end
  
  def goto(url)
    @url = url
    t = Thread.new(){
    puts "winclicker thread started"
    wc = WinClicker.new
    wc.clearSecurityAlertBox
    }
    m = Thread.new($ie) {
    $ie.goto(@url)
    }
    m.join
    t.join
    
    $ie.bring_to_front
    $ie.maximize
  end
end

browser = Browser.new
browser.goto('https://server_name/')
Go to contents, previous, next page.

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators