Monday, March 5, 2012

Selenium IDE commands that don't export to C# WebDriver

I'm working on a Selenium 2 automation framework in C#.  After recording scripts in IDE, I export them to C# (WebDriver).  Some IDE commands will not export to C#, and you end up with messages like this:
// ERROR: Caught exception [ERROR: Unsupported command [isTextPresent]]

So, obviously verifyTextPresent and assertTextPresent do not export.  I plan to figure out the best way to code this in C# because "verifyTextPresent" is useful in things like smoke scripts, where I don't want the script to fail easily because a page element moved or was renamed.

If you're using the flowControl extension, "gotoIf" and "label" commands do not export; but that's not really a big deal.

getEval and storeEval do not export.  Sometimes I use these javascript commands to get the current date or generate a random value.  Again no big deal.

These are the only ones I've run into so far.