Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Display results as :
Advanced Search

Go down
Active particpant
Active particpant
Posts : 19
Join date : 2012-02-23

Does rollup can evaluate var? Empty Does rollup can evaluate var?

on Thu Nov 08, 2012 10:53 am
Hi, all
I'm trying to code this and evaluate but never get TRUE, even I see in echo that it's . I did play will possible combination around ${}"''etc, but nothing helped.
I tested and see that rollups see and can evaluate var from outside using the same syntax (if (storedVars['var1'] == true) { then.... true....). But somehow if you assign it inside rollup I still have problem with IF, even in ELSE section I see state1 displayed again as "IL" !!!! Shocked
Can anybody help me with this, what is wrong with mine code?? any escapes I'm missing???


  commands.push({ command: 'storeSelectedLabel', target: 'id=Select_ddlState', value: 'state1' });
  commands.push({ command: 'echo', target: '${state1}' });              // displayed <IL>
  if (storedVars['state1'] == 'IL') { commands.push({ command: 'echo', target: 'True!!!!!!!!!!!!!!!!!!!!!!' });
                    commands.push({ command: 'echo', target: '${state1}' });                          }
  else {        commands.push({ command: 'echo', target: '2. False======' });
             commands.push({ command: 'echo', target: '${state1}' });      // displayed : IL  #2 !!!!!!!
Back to top
Permissions in this forum:
You cannot reply to topics in this forum