variables - Selenium Compare storedVars to Text -


i'm trying compare stored variable (user inputs variable value) predefined text. testing on beta site compared production site. example of code follows:

<tr>     <td>store</td>     <td>production</td>     <td>productionorbeta</td> </tr> <tr>     <td>storeeval</td>     <td>((storedvars['productionorbeta'] = &quot;beta&quot;)?'http://betasite.com/':'http://productionsite.com/')</td>     <td>targetwebsite</td> </tr> <tr>     <td>open</td>     <td>${targetwebsite}</td>     <td></td> </tr> <tr>     <td>storeeval</td>     <td>((${productionorbeta}=&quot;beta&quot;)?'betalogin':'productionlogin')</td>     <td>loginname</td> </tr> <tr>     <td>storeeval</td>     <td>((${productionorbeta}=&quot;beta&quot;)?'betapw':'productionpw')</td>     <td>loginpassword</td> </tr> 

i've tried single , double quote, both produce same results. above code seems logical me doesn't seem possible. no matter variable "productionorbeta" holds betasite open.

thank you,

jesse smothermon

i got it. here's code

<tr>     <td>store</td>     <td>production</td>     <td>productionorbeta</td> </tr> <tr>     <td>storeeval</td>     <td>((storedvars['productionorbeta'] == &quot;beta&quot;)?'http://betasite.com/':'http://productionsite.com/')</td>     <td>targetwebsite</td> </tr> <tr>     <td>open</td>     <td>${targetwebsite}</td>     <td></td> </tr> <tr>     <td>storeeval</td>     <td>((storedvars['productionorbeta']==&quot;beta&quot;)?'betalogin':'productionlogin')</td>     <td>loginname</td> </tr> <tr>     <td>storeeval</td>     <td>((storedvars['productionorbeta']==&quot;beta&quot;)?'betapw':'productionpw')</td>     <td>loginpassword</td> </tr> 

the difference being "storedvars['productionorbeta']" way through , double equals ("==") opposed single equals ("=").

thank you,

jesse smothermon


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -