0

Is there any good studying material or link about writting Webdriver specific JavaScript? I went through the (http://seleniumhq.org/docs/03_webdriver.html) it gives very basic idea not helping much about writing JavaScript which can help my Webdriver code to simulate various types of mouse and keyboard actions in the browser.

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Som
  • 4,618
  • 4
  • 29
  • 32

1 Answers1

3

Javascript in WebDriver can do anything any other Javascript can - so go for any Javascript resource if you'd like to know more. The few additions are well described here: JavaScriptExecutor.executeScript()

If you're especially interested in mouse and keyboard actions in browser, you might like like the Advanced User Interactions API, JavaDoc here.

Petr Janeček
  • 37,768
  • 12
  • 121
  • 145
  • Thanks a lot. is there any good java script resources link which can help me to write code to simulate mouse keyboard events in my webdriver code . I went through a few links like the one in w3schools but those are given mostly for writing on html page was not very help full to get the idea of using in webdriver code in short .. please let me know if you have any better link.. – Som May 31 '12 at 17:46
  • I very liked [this question here on SO](http://stackoverflow.com/questions/6157929/how-to-simulate-mouse-click-using-javascript) for simulating mouse events. That said, I think you don't need JS if you have WebDriver for this. What exactly are you trying to achieve? – Petr Janeček May 31 '12 at 18:02
  • It is a very good link .I just wanted to go through the references about writing java scripts for simulating events in case I need to use it in future . Thanks Slanec for the help .. – Som May 31 '12 at 18:19