Forum Discussion

prabhakarkallam's avatar
prabhakarkallam
Occasional Contributor
8 years ago

un able to get table wValue based up on row and column no

Hi 

 

iam trying to find value in java swing table row data,so based on that i need to select  the row and do some button clicks,this is my requirement .

 

to do this iam using automatedqa.script and automatedqa.testcomplete libraries for .net

 

please find the below given code

 

connect.runtest(.pjs file);

var workflow=connect.sys["process"]("java")

if(workflow(exists)

{

var prop=new var(new string[] {"Name"});

var valuear=new var(new string[]{swingobject(\"xxxx\",\"\",0)"}

var panel=workflow["Find"](prop,valuear,30000);

if(panel[Exists"]

{

var rowcount=(int)panel[""wRowCount"];

var columncount-(int)panel["wColumnCount"]

var coulmnname=(string)panel["wColumn"(2);  //here iam getting the column name

var value=(string)panel["wValue"](2,2);  //here iam trying to get value from the 2nd row and 2nd column

 

but iam not getting the value here,please help me on this

 

Regards,

Prabhakar k.

}

}

3 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Can you try with the below line?

    var value=(string)panel["wValue"](2,coulmnname);

    • prabhakarkallam's avatar
      prabhakarkallam
      Occasional Contributor

      Hi,

          yes i have tried the same

       

      var value=(string)panel["wValue"](2,coulmnname);

       

       still iam not getting  the  value

       

      parameter types in Testcomplete12  for wValue(int,object),so iam using automatedqa.script and automatedqa.testcomplete in .net,please help me on this

       

      Regards,

      Prabhakar k.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        Pretty sure it's not causing the error, but in order to keep my QA badge, I have to point out that "coulmnname" should be "columnname"   :)