This is my first post in StackOverFlow, and being a chinese, please ignore my poor english lol.
I am trying to use selenium do following actions: 1.open the url(url in code) 2. click "zonal" link under the "Real-Time Market LBMP" menu, which has unique tag"P-24A" 3. get the time for "most recent interval" file and print out.
High lighted elements are my target:
I was stucked with second xpath selector:
System.setProperty("webdriver.gecko.driver", "C:/Users/Haiqing/Downloads/geckodriver-v0.11.1-win64/geckodriver.exe");
WebDriver wd = new FirefoxDriver();
wd.get("http://mis.nyiso.com/public/");
wd.switchTo().frame("MENU");
WebElement zonalElement = wd.findElement(By.name("P-24Alist"));
zonalElement.click();
wd.switchTo().defaultContent();
wd.switchTo().frame("BODY");
WebElement mostRecentIntervalTime = wd.findElement(By.xpath("//a[contains(text(), 'Most recent interval')]/../following-sibling::td/span"));
System.out.println("Most recent updated time is : " + mostRecentIntervalTime.getText());
wd.quit();
And the HTML is belowed: Most recent interval 12/04/16 06:42 EST
got exception enter image description here
