Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You will have to use <code>Selenium</code> HTML Unit Driver for that. </p> <p><a href="http://www.seleniumhq.org/" rel="nofollow">Selenium Info</a></p> <p><a href="http://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java/2.37.1" rel="nofollow">Maven/Download Binary JAR</a></p> <p><a href="http://code.google.com/p/selenium/wiki/HtmlUnitDriver" rel="nofollow">HTML Unit Driver</a></p> <p>Here is full working <code>example</code>. It will visit the <code>website</code> ,<code>click</code> the button and then you can get the <code>data</code> from the page.</p> <p><strong>Edit: Only get the table value</strong></p> <pre><code>import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; public class GetData { public static void main(String args[]) throws InterruptedException { WebDriver driver = new FirefoxDriver(); driver.get("http://myservices.ect.nl/tracing/objectstatus/Pages/Overview.aspx"); Thread.sleep(5000); // select barge new Select(driver.findElement(By.id("ctl00_ctl15_g_ce17bd4b_3803_47f6_822a_2b8dd10fc67d_ctl00_dlModality"))).selectByVisibleText("Barge"); // click button Thread.sleep(3000); driver.findElement(By.className("button80")).click(); Thread.sleep(5000); //get only table text WebElement findElement = driver.findElement(By.className("grid-view")); String htmlTableText = findElement.getText(); // do whatever you want now, These are raw table values. System.out.println(htmlTableText); driver.close(); driver.quit(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload