Class DriverListener

  • All Implemented Interfaces:
    org.openqa.selenium.support.events.WebDriverListener

    public final class DriverListener
    extends Object
    implements org.openqa.selenium.support.events.WebDriverListener
    Listener for all WebElement related actions Currently - logs only
    Author:
    Nir Gallner
    • Constructor Summary

      Constructors 
      Constructor Description
      DriverListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterAnyWebDriverCall​(org.openqa.selenium.WebDriver driver, Method method, Object[] args, Object result)  
      void afterClose​(org.openqa.selenium.WebDriver driver)  
      void afterExecuteAsyncScript​(org.openqa.selenium.WebDriver driver, String script, Object[] args, Object result)  
      void afterExecuteScript​(org.openqa.selenium.WebDriver driver, String script, Object[] args, Object result)  
      void afterFindElement​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator, org.openqa.selenium.WebElement result)  
      void afterFindElements​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator, List<org.openqa.selenium.WebElement> result)  
      void afterGet​(org.openqa.selenium.WebDriver driver, String url)  
      void afterGetCurrentUrl​(String result, org.openqa.selenium.WebDriver driver)  
      void afterGetPageSource​(org.openqa.selenium.WebDriver driver, String result)  
      void afterGetTitle​(org.openqa.selenium.WebDriver driver, String result)  
      void afterGetWindowHandle​(org.openqa.selenium.WebDriver driver, String result)  
      void afterGetWindowHandles​(org.openqa.selenium.WebDriver driver, Set<String> result)  
      void afterPerform​(org.openqa.selenium.WebDriver driver, Collection<org.openqa.selenium.interactions.Sequence> actions)  
      void afterQuit​(org.openqa.selenium.WebDriver driver)  
      void afterResetInputState​(org.openqa.selenium.WebDriver driver)  
      void beforeAnyWebDriverCall​(org.openqa.selenium.WebDriver driver, Method method, Object[] args)  
      void beforeClose​(org.openqa.selenium.WebDriver driver)  
      void beforeExecuteAsyncScript​(org.openqa.selenium.WebDriver driver, String script, Object[] args)  
      void beforeExecuteScript​(org.openqa.selenium.WebDriver driver, String script, Object[] args)  
      void beforeFindElement​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator)  
      void beforeFindElements​(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By locator)  
      void beforeGet​(org.openqa.selenium.WebDriver driver, String url)  
      void beforeGetCurrentUrl​(org.openqa.selenium.WebDriver driver)  
      void beforeGetPageSource​(org.openqa.selenium.WebDriver driver)  
      void beforeGetTitle​(org.openqa.selenium.WebDriver driver)  
      void beforeGetWindowHandle​(org.openqa.selenium.WebDriver driver)  
      void beforeGetWindowHandles​(org.openqa.selenium.WebDriver driver)  
      void beforePerform​(org.openqa.selenium.WebDriver driver, Collection<org.openqa.selenium.interactions.Sequence> actions)  
      void beforeQuit​(org.openqa.selenium.WebDriver driver)  
      void beforeResetInputState​(org.openqa.selenium.WebDriver driver)  
      • Methods inherited from interface org.openqa.selenium.support.events.WebDriverListener

        afterAccept, afterAddCookie, afterAnyAlertCall, afterAnyCall, afterAnyNavigationCall, afterAnyOptionsCall, afterAnyTimeoutsCall, afterAnyWebElementCall, afterAnyWindowCall, afterBack, afterClear, afterClick, afterDeleteAllCookies, afterDeleteCookie, afterDeleteCookieNamed, afterDismiss, afterFindElement, afterFindElements, afterForward, afterFullscreen, afterGetAttribute, afterGetCookieNamed, afterGetCookies, afterGetCssValue, afterGetLocation, afterGetPosition, afterGetSize, afterGetSize, afterGetTagName, afterGetText, afterGetText, afterImplicitlyWait, afterIsDisplayed, afterIsEnabled, afterIsSelected, afterMaximize, afterPageLoadTimeout, afterRefresh, afterSendKeys, afterSendKeys, afterSetPosition, afterSetScriptTimeout, afterSetSize, afterSubmit, afterTo, afterTo, beforeAccept, beforeAddCookie, beforeAnyAlertCall, beforeAnyCall, beforeAnyNavigationCall, beforeAnyOptionsCall, beforeAnyTimeoutsCall, beforeAnyWebElementCall, beforeAnyWindowCall, beforeBack, beforeClear, beforeClick, beforeDeleteAllCookies, beforeDeleteCookie, beforeDeleteCookieNamed, beforeDismiss, beforeFindElement, beforeFindElements, beforeForward, beforeFullscreen, beforeGetAttribute, beforeGetCookieNamed, beforeGetCookies, beforeGetCssValue, beforeGetLocation, beforeGetPosition, beforeGetSize, beforeGetSize, beforeGetTagName, beforeGetText, beforeGetText, beforeImplicitlyWait, beforeIsDisplayed, beforeIsEnabled, beforeIsSelected, beforeMaximize, beforePageLoadTimeout, beforeRefresh, beforeSendKeys, beforeSendKeys, beforeSetPosition, beforeSetScriptTimeout, beforeSetSize, beforeSubmit, beforeTo, beforeTo, onError
    • Constructor Detail

      • DriverListener

        public DriverListener()
    • Method Detail

      • beforeAnyWebDriverCall

        public void beforeAnyWebDriverCall​(org.openqa.selenium.WebDriver driver,
                                           Method method,
                                           Object[] args)
        Specified by:
        beforeAnyWebDriverCall in interface org.openqa.selenium.support.events.WebDriverListener
      • afterAnyWebDriverCall

        public void afterAnyWebDriverCall​(org.openqa.selenium.WebDriver driver,
                                          Method method,
                                          Object[] args,
                                          Object result)
        Specified by:
        afterAnyWebDriverCall in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeGet

        public void beforeGet​(org.openqa.selenium.WebDriver driver,
                              String url)
        Specified by:
        beforeGet in interface org.openqa.selenium.support.events.WebDriverListener
      • afterGet

        public void afterGet​(org.openqa.selenium.WebDriver driver,
                             String url)
        Specified by:
        afterGet in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeGetCurrentUrl

        public void beforeGetCurrentUrl​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeGetCurrentUrl in interface org.openqa.selenium.support.events.WebDriverListener
      • afterGetCurrentUrl

        public void afterGetCurrentUrl​(String result,
                                       org.openqa.selenium.WebDriver driver)
        Specified by:
        afterGetCurrentUrl in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeGetTitle

        public void beforeGetTitle​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeGetTitle in interface org.openqa.selenium.support.events.WebDriverListener
      • afterGetTitle

        public void afterGetTitle​(org.openqa.selenium.WebDriver driver,
                                  String result)
        Specified by:
        afterGetTitle in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeFindElement

        public void beforeFindElement​(org.openqa.selenium.WebDriver driver,
                                      org.openqa.selenium.By locator)
        Specified by:
        beforeFindElement in interface org.openqa.selenium.support.events.WebDriverListener
      • afterFindElement

        public void afterFindElement​(org.openqa.selenium.WebDriver driver,
                                     org.openqa.selenium.By locator,
                                     org.openqa.selenium.WebElement result)
        Specified by:
        afterFindElement in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeFindElements

        public void beforeFindElements​(org.openqa.selenium.WebDriver driver,
                                       org.openqa.selenium.By locator)
        Specified by:
        beforeFindElements in interface org.openqa.selenium.support.events.WebDriverListener
      • afterFindElements

        public void afterFindElements​(org.openqa.selenium.WebDriver driver,
                                      org.openqa.selenium.By locator,
                                      List<org.openqa.selenium.WebElement> result)
        Specified by:
        afterFindElements in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeGetPageSource

        public void beforeGetPageSource​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeGetPageSource in interface org.openqa.selenium.support.events.WebDriverListener
      • afterGetPageSource

        public void afterGetPageSource​(org.openqa.selenium.WebDriver driver,
                                       String result)
        Specified by:
        afterGetPageSource in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeClose

        public void beforeClose​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeClose in interface org.openqa.selenium.support.events.WebDriverListener
      • afterClose

        public void afterClose​(org.openqa.selenium.WebDriver driver)
        Specified by:
        afterClose in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeQuit

        public void beforeQuit​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeQuit in interface org.openqa.selenium.support.events.WebDriverListener
      • afterQuit

        public void afterQuit​(org.openqa.selenium.WebDriver driver)
        Specified by:
        afterQuit in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeGetWindowHandles

        public void beforeGetWindowHandles​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeGetWindowHandles in interface org.openqa.selenium.support.events.WebDriverListener
      • afterGetWindowHandles

        public void afterGetWindowHandles​(org.openqa.selenium.WebDriver driver,
                                          Set<String> result)
        Specified by:
        afterGetWindowHandles in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeGetWindowHandle

        public void beforeGetWindowHandle​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeGetWindowHandle in interface org.openqa.selenium.support.events.WebDriverListener
      • afterGetWindowHandle

        public void afterGetWindowHandle​(org.openqa.selenium.WebDriver driver,
                                         String result)
        Specified by:
        afterGetWindowHandle in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeExecuteScript

        public void beforeExecuteScript​(org.openqa.selenium.WebDriver driver,
                                        String script,
                                        Object[] args)
        Specified by:
        beforeExecuteScript in interface org.openqa.selenium.support.events.WebDriverListener
      • afterExecuteScript

        public void afterExecuteScript​(org.openqa.selenium.WebDriver driver,
                                       String script,
                                       Object[] args,
                                       Object result)
        Specified by:
        afterExecuteScript in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeExecuteAsyncScript

        public void beforeExecuteAsyncScript​(org.openqa.selenium.WebDriver driver,
                                             String script,
                                             Object[] args)
        Specified by:
        beforeExecuteAsyncScript in interface org.openqa.selenium.support.events.WebDriverListener
      • afterExecuteAsyncScript

        public void afterExecuteAsyncScript​(org.openqa.selenium.WebDriver driver,
                                            String script,
                                            Object[] args,
                                            Object result)
        Specified by:
        afterExecuteAsyncScript in interface org.openqa.selenium.support.events.WebDriverListener
      • beforePerform

        public void beforePerform​(org.openqa.selenium.WebDriver driver,
                                  Collection<org.openqa.selenium.interactions.Sequence> actions)
        Specified by:
        beforePerform in interface org.openqa.selenium.support.events.WebDriverListener
      • afterPerform

        public void afterPerform​(org.openqa.selenium.WebDriver driver,
                                 Collection<org.openqa.selenium.interactions.Sequence> actions)
        Specified by:
        afterPerform in interface org.openqa.selenium.support.events.WebDriverListener
      • beforeResetInputState

        public void beforeResetInputState​(org.openqa.selenium.WebDriver driver)
        Specified by:
        beforeResetInputState in interface org.openqa.selenium.support.events.WebDriverListener
      • afterResetInputState

        public void afterResetInputState​(org.openqa.selenium.WebDriver driver)
        Specified by:
        afterResetInputState in interface org.openqa.selenium.support.events.WebDriverListener