Announcement

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

    Access ListGrid using Selenium

    Hi Isomorphic,

    I am using licensed version of SmartGWT PRO 4.1 (isc.version="v9.1p_2014-06-14/Pro Deployment";isc.versionNumber="v9.1p_2014-06-14";isc.buildDate="2014-06-14")

    Problem statement,

    We have an enterprise MDI solution on top of which we want to build selenium automation. My problem is, i am setting few attributes to my extended listgrid using below code,

    setAttribute("uniqueKey", "LIVEGRID_1", true);
    setAttribute("name", "LIVEGRID_1", true);
    getOuterElement().setAttribute("uniqueKey", "LIVEGRID_1");
    getOuterElement().setAttribute("name", "LIVEGRID_1");

    Below is my selenium code where i am trying to access listgrid using my attribute,

    List<WebElement> temp2 = driver.findElements(By.xpath(".//*[@class='listTable']"));

    int num=temp2.size();

    for (int tableindex=0;tableindex<temp2.size();tableindex++){
    WebElement table=temp2.get(tableindex);

    String attribute = table.getAttribute("uniqueKey");
    }

    Please note that, in selenium I am unable to get the value "LIVEGRID_1" which I had set in my extended listgrid class.

    Please let me know how i can set something from my class which I can get in my selenium.

    #2
    Please read the Automated Testing overview. Your approach (direct DOM access) is entirely wrong.

    Comment


      #3
      As we don't have any attribute available for table we have used direct approach to use class and iterated over each available class and tried various option to access attached identifier.

      Our problem is we need to set any identifier at table level in development which we can access in Selenium.

      can you please guide me to set identifier at table level which we can access in Selenium.

      Comment


        #4
        Looks like you have only skimmed the Automated Testing materials. Try again - locators for grid data are explicitly discussed.

        Comment

        Working...
        X