Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Selenium Get Record and/or Row Count

    Using the SmartClientWebDriver, is it possible to get an entire record from a ListGrid/TreeGrid? And the total row count?

    Thanks!

    #2
    The SmartClientWebDriver APIs are more geared towards verifying individual number or string values, perhaps because it arose out of Selenese, where all results are ultimately compared against strings.

    However, if you want to grab an entire record, you can do it with SmartClientWebDriver.executeScript(), since SCWD implements the JavascriptExecutor interface. That should return a Java Map for your record.

    Note, however, that you'll need to pass it JavaScript to evaluate. Since you're posting on the SmartGWT forum, the APIs may be unfamiliar so you may want to consult the JS documentation here. In your JavaScript, you could do something like call AutoTest.getObject() on a locator for your target grid, or just access it from window by ID. Then you'd want to call getTotalRows() or getRecord().

    Comment


      #3
      Perfect, thank you!. We were able to get this working use the AuoTest class.

      Comment

      Working...
      X