Proposed (small) WebDriver API change

119 views
Skip to first unread message

Alexei Barantsev

unread,
Feb 20, 2016, 5:10:49 AM2/20/16
to Selenium Developers
Hi, devs,

I'd like to propose a tiny API change that should not affect users but would make API more consistent:

Let's introduce NoSuchSessionException and include it into the core WebDriver API.

Current status:
All drivers (except for maybe SafariDriver) throw SessionNotFoundException on an attempt to call any operation after quit(). This exception is located in org.openqa.selenium.remote package for historical reasons.

Why the change:
I want to add information about this exception to the documentation of methods in WebDriver class. But it is not eligible to refer to a class located in org.openqa.selenium.remote package.

Why this change does not affect users:
-- we introduce a new NoSuchSessionException class and describe it in the API documentation
-- we make the existing SessionNotFoundException extends NoSuchSessionException
-- all the existing client code works without modifications
-- new users handle NoSuchSessionException as claimed in the documentation

Along with this we deprecate SessionNotFoundException in the remote package and remove it in Selenium 3.0.

Regards,
-- 
Alexei Barantsev
Software-Testing.Ru
Selenium2.Ru

David Burns

unread,
Feb 21, 2016, 5:57:27 AM2/21/16
to Selenium Developers
Sounds fine to me.

David

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/8bac6701-fa1b-49fb-8add-793ec2d4b736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages