Class DevTools

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class DevTools
    extends java.lang.Object
    implements java.io.Closeable
    • Method Detail

      • getDomains

        public Domains getDomains()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • disconnectSession

        public void disconnectSession()
      • send

        public <X> X send​(Command<X> command)
      • addListener

        public <X> void addListener​(Event<X> event,
                                    java.util.function.Consumer<X> handler)
      • clearListeners

        public void clearListeners()
      • createSessionIfThereIsNotOne

        public void createSessionIfThereIsNotOne()
      • createSessionIfThereIsNotOne

        public void createSessionIfThereIsNotOne​(java.lang.String windowHandle)
      • createSession

        public void createSession()
      • createSession

        public void createSession​(java.lang.String windowHandle)
        Create CDP session on given window/tab (aka target). If windowHandle is null, then the first "page" type will be selected. Pass the windowHandle if you have multiple windows/tabs opened to connect to the expected window/tab.
        Parameters:
        windowHandle - result of WebDriver.getWindowHandle(), optional.
      • getCdpSession

        public SessionID getCdpSession()