Recorded step creates an unresolved compilation problem

Comments

2 comments

  • Avatar
    Angshuman

    Hi,


    Table cell access is not really supported by Sahi while recording. We advise handcoding them, instead of recording as table layouts can get complicated and is almost always flacky if you record. The following script should help you get around, (with example based on sahi website)



        browser.navigateTo("http://sahi.co.in/w/_cell");
           ElementStub table = browser.table("items");
            System.out.println("1 row, 1 col: " +  browser.cell(table, 1, 1).getText());
            System.out.println("1 row, 2 col: " +  browser.cell(table, 1, 2).getText());
            System.out.println("2 row, 2 col: " +  browser.cell(table, 2, 2).getText());


    or check this:


      browser.navigateTo("http://sahi.co.in/w/sahi-api-examples");


      ElementStub table = browser.table("listing");
      String cellValue = browser.cell(table, 1, 2).getText();


    alternative you can also use Sahi's near api.  for example, as comprehensive as: browser.checkbox(0).near(


  • Avatar
    azuniga

    Thank you for your response. I guess I was a bit unclear in the description of my problem. I was basically recording a click of a button, a tab button from a gwt tabset widget to be exact, and it was creating an error. It turns out that my workspace defaulted to JRE 1.6 compliance and I had to manually change it to 1.5 compliance. When I did that, all the errors went away. 

Please sign in to leave a comment.