Ask a Question

member not found error is seen.

msap
Frequent Contributor

member not found error is seen.

any suggestions why I am getting this error:

 

Run the below script:

 

var flag = 0;
for(var i= 0;i<Grid.wRowCount;i++){
if(String(Grid.wValue(i,1))== "500322" && String(Grid.wValue(i,2))== "COUNTRY" && String(Grid.wValue(i,3))== "TEST" && String(Grid.wValue(i,4))== "Canada"){
Log.Message("Row exists");
flag = 1;
break;

20 REPLIES 20
tristaanogre
Esteemed Contributor

What line of the code are you getting "Member not found" on?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
msap
Frequent Contributor

if(String(Grid.wValue(i,1))== "500322" && String(Grid.wValue(i,2))== "COUNTRY" && String(Grid.wValue(i,3))== "TEST" && String(Grid.wValue(i,4))== "Canada")

Marsha_R
Champion Level 3

Are you sure that the grid numbers are 1,2,3,4 and not 0,1,2,3?   

msap
Frequent Contributor

yes, i didn't specify from 0 but script  considers the grid from 0,1,2,3,4..

tristaanogre
Esteemed Contributor

Try commenting out individual portions of that IF statement to see if you can determine which one is returning the error, if there is a specific one.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
msap
Frequent Contributor

i tried commenting : i think wvalue for if statement itself is returning error.not sure whats wrong with that.

tristaanogre
Esteemed Contributor

You're certain that the wValue property is supported for your grid type?

Also, since you're using JavaScript, couple of things:

 

1) Always a good idea to put parenthesis around the different clauses in your IF statement to make sure things are properly evaluated.

2)  Try using aqConvert.VarToStr instead of the String method

 

 

So... change your if statement to something like:

 

if((aqConvert.VarToStr(Grid.wValue(i,1))== "500322") && (aqConvert.VarToStr(Grid.wValue(i,2))== "COUNTRY") && (aqConvert.VarToStr(Grid.wValue(i,3))== "TEST") && (aqConvert.VarToStr(Grid.wValue(i,4))== "Canada"))

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
msap
Frequent Contributor

no luck, doesnot work. same error is seen.

tristaanogre
Esteemed Contributor

Then my suspicion is that wValue is not supported.... Please use Object Spy and confirm (post screenshot) that wValue IS a supported property of your grid.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: