Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.openqa.selenium.WebDriver;
- import org.openqa.selenium.firefox.FirefoxDriver;
- import org.openqa.selenium.firefox.FirefoxProfile;
- import org.openqa.selenium.firefox.internal.ProfilesIni;
- public class testHandleFireFoxcertificatesIssue {
- public static void main(String[] args) {
- //Class ProfilesIni details -> http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html
- ProfilesIni allProfiles = new ProfilesIni();
- //Class FirefoxProfile -> http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html
- // Use FirefoxProfile Constructor
- FirefoxProfile myProfile = allProfiles.getProfile("CertificateIssue");
- myProfile.setAcceptUntrustedCertificates(true);
- myProfile.setAssumeUntrustedCertificateIssuer(false);
- WebDriver myDriver = new FirefoxDriver(myProfile);
- myDriver.get("http://www.paypal.com");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement