Calling a function in a JavaScript file with Selenium IDE

Posted by user1059903 on Stack Overflow See other posts from Stack Overflow or by user1059903
Published on 2012-01-09T20:10:50Z Indexed on 2012/07/10 9:15 UTC
Read the original article Hit count: 151

So, I'm running these Selenium IDE tests against a site I'm working on. Everything about the tests themselves is running fine, except I would like to do a bit of clean-up once I'm done. In my MVC3 Razor based site, I have a JavaScript file with a function that gets a JsonResult from a Controller of mine. That Controller handles the database clean-up that Selenium IDE otherwise couldn't handle.

However, I'm having a hard time finding any sort of documentation on how to do this. I know I can do JavaScript{ myJavascriptGoesHere } as one of the Values for a line in the test, but I can't seem to find a way to tell it to go find my clean-up function.

Is it even possible for Selenium IDE to do this sort of thing?

If it comes down to it, I can just make a separate View to handle the clean-up, but I'd really like to avoid that if possible.

Thanks!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about asp.net-mvc-3