Which parts of Selenium are meant to be used in extensions?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Which parts of Selenium are meant to be used in extensions?

GW-5
Just started using Selenium - very cool.  I found I needed to match a regex against text on a page so I whipped up the following:

Selenium.prototype.assertTextMatches = function( pattern ) {
  var allText = this.page().bodyText();
  if( allText == "" ) {
    Assert.fail( "Page text not found" );
  } else if( new PatternMatcher( pattern ).matches( allText ) == -1 ) {
    Assert.fail( "'" + pattern + "' not found in page text." );
  }
};

It works as I wanted, all is well.  My question is this: should I be using PatternMatcher or not?  Is this likely to change/break when the next version of Selenium is released?

A more general question is how does one tell what parts of the API are public and what parts are private?  While using PatternMatcher seems fairly safe, what if I wanted to futz around with the currentCommandRow variable for instance?

Thanks.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1219&messageID=3494#3494

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]