New warning is showing up now

198 views
Skip to first unread message

rajagopal...@gmail.com

unread,
May 2, 2019, 5:53:55 AM5/2/19
to Watir General
Hi,

I am getting this warning now

2019-05-02 13:57:16 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ObsoleteElementError is deprecated. Use Selenium::WebDriver::Error::StaleElementReferenceError (ensure the driver supports W3C WebDriver specification) instead.



jkot...@gmail.com

unread,
May 2, 2019, 3:07:03 PM5/2/19
to Watir General
I believe this pull request will address this - https://github.com/watir/watir/pull/867/files

Justin

rajagopalan madasami

unread,
May 10, 2019, 4:15:14 AM5/10/19
to Watir General
here anyway I can uncomment this? where should I do?

rajagopalan madasami

unread,
May 10, 2019, 4:16:15 AM5/10/19
to watir-...@googlegroups.com
I meant to ask how can I comment that one?

--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general
watir-genera...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-genera...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Justin Ko

unread,
May 10, 2019, 1:17:11 PM5/10/19
to Watir General
It does not look like Selenium-WebDriver provides a mechanism for ignoring specific deprecations. You will have to monkey-patch the error away:

require 'selenium-webdriver'

module Selenium
 
module WebDriver
   
module Error # rubocop:disable Metrics/ModuleLength
     
def self.const_missing(const_name)
       
super unless DEPRECATED_ERRORS.key?(const_name)
       
if DEPRECATED_ERRORS[const_name]
         
#WebDriver.logger.deprecate("Selenium::WebDriver::Error::#{const_name}",
         
#                           "#{DEPRECATED_ERRORS[const_name]} (ensure the driver supports W3C WebDriver specification)")
          DEPRECATED_ERRORS
[const_name]
       
else
         
WebDriver.logger.deprecate("Selenium::WebDriver::Error::#{const_name}")
         
WebDriverError
       
end
     
end
   
end
 
end
end

Justin



On Friday, May 10, 2019 at 4:16:15 AM UTC-4, rajagopalan madasami wrote:
I meant to ask how can I comment that one?

On Fri, 3 May, 2019, 12:37 AM , <jkot...@gmail.com> wrote:
I believe this pull request will address this - https://github.com/watir/watir/pull/867/files

Justin

On Thursday, May 2, 2019 at 5:53:55 AM UTC-4, rajagopal...@gmail.com wrote:
Hi,

I am getting this warning now

2019-05-02 13:57:16 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ObsoleteElementError is deprecated. Use Selenium::WebDriver::Error::StaleElementReferenceError (ensure the driver supports W3C WebDriver specification) instead.



--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.
 
watir-...@googlegroups.com
http://groups.google.com/group/watir-general

---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-...@googlegroups.com.

rajagopalan madasami

unread,
May 10, 2019, 2:50:56 PM5/10/19
to Watir General
Thank you, I also located that error.rb file directly and commented that error from

DEPRECATED_ERRORS = {
IndexOutOfBoundsError: nil,
NoCollectionError: nil,
NoStringError: nil,
NoStringLengthError: nil,
NoStringWrapperError: nil,
NoSuchDriverError: nil,
ElementNotVisibleError: ElementNotInteractableError,
InvalidElementStateError: ElementN
...
....
...

Thank you.


Reply all
Reply to author
Forward
0 new messages