0

Please find below code as it gives error 'object requred' on
If (aqString["ToUpper"](strCellValue) == aqString["ToUpper"](StrVal)) line.

function tableClick(){

  ObjTable = mGetObject(sGlobalPageURL,"ObjectType,Name","Table,Table*list_product_group_table*")
  intRows =  ObjTable.RowCount
  strCellValue = "TAA - Test Automation Account"

  for (i = 1; i < intRows; i++) { 
    StrVal = ObjTable.Cell(i,0).innerText
     If (aqString["ToUpper"](strCellValue) == aqString["ToUpper"](StrVal))
     {
      ObjTable.Cell(i,3).click()
      break; 
     }
   }  
}
1
  • FYI: There's a shorter code for this comparison: if (aqString["Compare"](strCellValue, StrVal, true) == 0) Commented Nov 5, 2014 at 8:08

1 Answer 1

0

The JScript language does not have the If keyword (first I capitalized). Use small letters for keywords:

 if (aqString["ToUpper"](strCellValue) == aqString["ToUpper"](StrVal))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.