I am not able to click a link in a frame in run mode. First I switched to Frame and then click on a link. After clicking the link, I want to click on another link on the same frame. But not able to click on the second link. In Debug mode, I am able to click both the link.
Used URL: http://demo.guru99.com/selenium/deprecated.html
There are three frames on the page and I switch to frame named "classFrame". On the Frame, I click on the link named "Deprecated". I got all the content of "Deprecated" link. Now I want to click on "Overview" link where I was before. But I am not able to click on link named "Overview". Please help me to click on the second link "Overview". I am using following code:
System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver.exe");
WebDriver driverChrome = new ChromeDriver();
WebDriverWait webWaitVar = new WebDriverWait(driverChrome, 1000);
driverChrome.get("http://demo.guru99.com/selenium/deprecated.html");
driverChrome.switchTo().frame("classFrame");
driverChrome.findElement(By.linkText("Deprecated")).click();
WebElement linkOverview = driverChrome.findElement(By.linkText("Overview"));
webWaitVar.until(ExpectedConditions.visibilityOf(linkOverview));
driverChrome.findElement(By.linkText("Overview")).click();
For page HTML code, Please refer the link as I am not able to paste it here. Thank you very much