|
Re: error management: msg#00100web.selenium.user
selenium-users-bounces-EcuzILgp2tAZVhN9JVcPDEqbzN8AcRLmILAQCsJbaHk@xxxxxxxxxxxxxxxx wrote on 24/10/2005 09:06:28 PM: > Hello all, > > maybe my user-extensions.js is wrong. > > Selenium.prototype.assertCmd = function (xxx) > { > > if (xxx) > { > return (true); > } > > var errorMessage = "error message"; > > throw new Error(errorMessage); > } Instead of throw new Error(errorMessage); Try Assert.fail(errorMessage); Also, if you are using release 0.6, consider if what you are asserting can be expressed in terms of a locator. If you can write a method like: Selenium.prototype.getBlah() or Selenium.prototype.getBlah(locator) that returns a value, then you will automatically have assertBlah, assertNotBlah, verifyBlah, and verifyNotBlah. assertBlah | value or, if your function took a locator, then assertBlah | locator | value Cheers, David David Kemp ThoughtWorks Australia Pty Ltd http://www.thoughtworks.com _______________________________________________ Selenium-users mailing list Selenium-users-EcuzILgp2tAZVhN9JVcPDEqbzN8AcRLmILAQCsJbaHk@xxxxxxxxxxxxxxxx http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | installing selenium assistant: 00100, softwarepr |
|---|---|
| Next by Date: | Re: HOW TO v2: Testing remote sites with Seleniumand Internet Explorer: 00100, vernon viles |
| Previous by Thread: | error managementi: 00100, neko bsd |
| Next by Thread: | installing selenium assistant: 00100, softwarepr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |