!!

Welcome to Selenium Webdriver Forum

As a web user you can read and search through forum content. Once you have registered and signed you can post topics, post replies, set up watch lists, modify forum settings, and use private messaging.

Author Topic: Adding custom message to time out exception on FluentWait  (Read 648 times)

Martin Walton

  • Web User
Adding custom message to time out exception on FluentWait
« on: April 12, 2012, 07:43:05 PM »
I'd like to add the ability to add a custom message to the timeout
 exception thrown by FluentWait when the condition is not satisfied in
 time.
 At the moment, the exception thrown has the message "Timed out in %s
 seconds" and includes the last exception message.
 
The change I am proposing would display the existing message, or would
 append the custom message if one has been set.
 
FluentWait wait = new FluentWait().withMessage("Waiting for something
 to have happen")
 would result in the exception message "Timed out in %s seconds:
 Waiting for something to have happen" if the condition is not met.
 
FluentWait wait = new FluentWait()
 would continue to result in the exception message "Timed out in %s
 seconds" if the condition is not met.
 
I have already coded the change and written a test if someone would
 like to review it to be added to the project.

Jason Leyba

  • Web User
Re: Adding custom message to time out exception on FluentWait
« Reply #1 on: April 12, 2012, 07:43:27 PM »
I'll take a look for you.  Could you file a
 ticket<http://code.google.com/p/selenium/issues/list> with
 your patch attached?
 
-- Jason
 
On Tue, Nov 15, 2011 at 11:41 AM, Martin Walton <mwalton...@gmail.com>wrote:
 

- Show quoted text -

Martin Walton

  • Web User
Re: Adding custom message to time out exception on FluentWait
« Reply #2 on: April 12, 2012, 07:43:44 PM »
I have raised this ticket and attached the patch:
 http://code.google.com/p/selenium/issues/detail?id=2889
 
Thanks,
 
Martin
 
On Nov 18, 7:12 pm, Jason Leyba <jmle...@gmail.com> wrote:
 

- Show quoted text -

Selenium Webdriver

Re: Adding custom message to time out exception on FluentWait
« Reply #2 on: April 12, 2012, 07:43:44 PM »

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
222 Views
Last post February 22, 2012, 01:46:57 PM
by Joshi
1 Replies
477 Views
Last post February 22, 2012, 01:55:06 PM
by ppzhupapa
0 Replies
181 Views
Last post February 22, 2012, 05:32:58 PM
by Joshi
1 Replies
324 Views
Last post February 22, 2012, 05:44:59 PM
by ppzhupapa
3 Replies
765 Views
Last post April 09, 2012, 01:51:37 PM
by Jason Leyba
2 Replies
593 Views
Last post April 12, 2012, 01:56:45 PM
by robbie.ware...@nokia.com
2 Replies
243 Views
Last post April 12, 2012, 06:56:07 PM
by Martin Walton

Review www.seleniumwebdriver.com on alexa.com