I have html code for button like below I Understand the Risks
I want to click on the button and it will expand and click another button which will be visible after it will expand.
I have a requirement when user suppose enter this page "https://cacert.org/" , it will ask for SSL certificate , then i will click on "I Understand the Risk" link then click on "Add Exception" Button then it will open "Add Security Exception" pop up then click on "Confirm security Exception" button. I don't want to over ride SSL certificate error
Refer my code snipet::
public class main_script {
public static WebDriver driver;
@Test
public void test() throws Exception{
ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("work");
myprofile.setAcceptUntrustedCertificates(false);
WebDriver driver = new FirefoxDriver(myprofile);
driver.manage().window().maximize();
driver.get("https://cacert.org/");
driver.findElement(By.id("expertContent")).click();
driver.findElement(By.id("exceptionDialogButton")).click();
}
So i am not able to click on "I Understand the Risks" link