【发布时间】:2015-12-19 12:50:07
【问题描述】:
有一个下拉列表,我需要将新值与旧月份字符串 = Sep 2015(非常规井)进行比较。然后如果不等于,那么这是一个新的月份,应该下载它,否则退出循环。可以把 List 放到 ArrayList 中比较字符串吗?
请帮忙
WebDriver driver=new FirefoxDriver();
//opening the PA page
driver.get("http://www.depreportingservices.state.pa.us/ReportServer/Pages/ReportViewer.aspx?%2fOil_Gas%2fOil_Gas_Well_Historical_Production_Report");
//maximizing the window
driver.manage().window().maximize();
WebElement select = driver.findElement(By.xpath(".//*[@id='ReportViewerControl_ctl04_ctl03_ddValue']"));
//List<WebElement> options = select.findElements(By.tagName("option"));
String str="Sep 2015 (Unconventional wells)";
【问题讨论】:
标签: java selenium selenium-webdriver