Hi I am trying to scrape data from a web site I want to auto select dropdown menu in that website and then capture all data from the table.
I am having a problem because in that website table id is not available there so I am confused how can I scrape that value.
Here is my code
public class Market {
public static void main(String args[]) throws InterruptedException, ClassNotFoundException, SQLException {
WebDriver driver = new HtmlUnitDriver(BrowserVersion.getDefault());
String market="Rura";
String url="http://www.upmandiparishad.in/CW_Rates_new.asp";
driver.get(url);
Thread.sleep(5000);
new Select(driver.findElement(By.id("mktcode"))).selectByVisibleText(market);
Thread.sleep(3000);
Thread.sleep(5000);
WebElement findElement = driver.findElement(By.id("what to give here"));
String htmlTableText = findElement.getText();
System.out.println(htmlTableText);
driver.close();
driver.quit();
}
}
How can I achieve my output