Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

How do i Execute javascript in selenium directly? How we use command in java script? In selenium Ide i sotre in selenium core extension (User-extention.js) file and which file store in selenium ide extention....

enter image description here I also run the below script but i can''t get result...

<body
<table>
<tr>
  <td>open</td>
  <td>https://www.google.com</td>
  <td></td>
</tr>
<tr>
  <td>store</td>
  <td>40</td>
  <td></td>
</tr>
<tr>
  <td>store</td>
  <td>0</td>
  <td></td>
</tr>
<tr>
  <td>while</td>
  <td>storedVars.looptimes &lt; = 20</td>
  <td></td>
</tr>
<tr>
  <td>storeEval</td>
  <td>selenium.browserbot.getCurrentWindow().scrollTo(o,${i})</td>
  <td></td>
</tr>
<tr>
  <td>store</td>
  <td>javascript{storedVars.looptimes++;}</td>
  <td></td>
  </tr>
  <tr>
  <td>storeEval</td>
      <td>${i}+40</td>
      <td></td>
     </tr>
     <tr>
    <td>endWhile</td>
    <td></td>
    <td></td>
    <tr>
    </table>
    </body>

But i am getting error

[error] Unexpected Exception: SyntaxError: syntax error. fileName -> chrome://flowcontrol/content/extensions/goto-sel-ide.js?1392885586314, lineNumber -> 134

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Please check the code I have given.

http://seleniumworks.blogspot.in/2014/01/selenium-ide-data-driven.html

Also make sure,

  • Active developer tools and
  • Enable experimental features

checkboxes are Enabled.


Prashanth Sams | seleniumworks.com

share|improve this answer
1  
Very use full answer. Also your blog is very informative.. My another questions is I am new in selenium ide working on command. My testing most of the work in mobile testing in device. If any possibility to use selenium in any online project. Or how to use selenium in mobile application. –  Tehsil Feb 21 at 5:10
1  
I use APPIUM [tests can be written in your favorite Webdriver-compatible language] for testing Mobile Apps; If you need to work with APPIUM, please check my blog. –  Prashanth Sams Feb 21 at 5:32
    
How do i work in APPIUM, Because i am using ubuntu (Linux) os. Most of the application in android, ios, and balckberry. For that i want to install emulator of particular device. Or any other option..By the way thanx for your value able reply. –  Tehsil Feb 21 at 7:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.