RPA Community Forum

Double FOR loop results to Syntax Error: Unexpected token '}'

#1

Hi, I have a code that parse pages and loops on every item in the list, it results to an error as below:

Syntax Error: Unexpected token ‘}’
phantomjs://code/ace_test.js:1482 in injectJs
phantomjs://code/bootstrap.js:456

Below is the code:

for (n=1; n<=45; n++)
{

  for(i=1; i<=50; i++) 
  {
      click //*[@id="AppFrameMain"]/div/div/div[2]/div/div[1]/div/div/div[2]/ul/li[i]
      wait 2.0
      click //*[@id="order-title-bar"]/div[1]/div[1]/a/span
  }

  wait 3.0
  click //*[@id="AppFrameMain"]/div/div/div[2]/div/div[1]/div/div/div[3]/nav/span/button

}