Class SelenideTargetLocator

  • All Implemented Interfaces:
    org.openqa.selenium.WebDriver.TargetLocator

    public class SelenideTargetLocator
    extends java.lang.Object
    implements org.openqa.selenium.WebDriver.TargetLocator
    • Constructor Summary

      Constructors 
      Constructor Description
      SelenideTargetLocator​(Config config, org.openqa.selenium.WebDriver webDriver)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.openqa.selenium.WebElement activeElement()  
      org.openqa.selenium.Alert alert()  
      org.openqa.selenium.WebDriver defaultContent()  
      org.openqa.selenium.WebDriver frame​(int index)  
      org.openqa.selenium.WebDriver frame​(java.lang.String nameOrId)  
      org.openqa.selenium.WebDriver frame​(org.openqa.selenium.WebElement frameElement)  
      org.openqa.selenium.WebDriver innerFrame​(java.lang.String... frames)
      Switch to the inner frame (last child frame in given sequence)
      org.openqa.selenium.WebDriver parentFrame()  
      org.openqa.selenium.WebDriver window​(int index)
      Switch to window/tab by index NB! Order of windows/tabs can be different in different browsers, see Selenide tests.
      org.openqa.selenium.WebDriver window​(java.lang.String nameOrHandleOrTitle)
      Switch to window/tab by name/handle/title
      protected static org.openqa.selenium.WebDriver windowByTitle​(org.openqa.selenium.WebDriver driver, java.lang.String title)
      Switch to window/tab by name/handle/title except some windows handles
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SelenideTargetLocator

        public SelenideTargetLocator​(Config config,
                                     org.openqa.selenium.WebDriver webDriver)
    • Method Detail

      • frame

        public org.openqa.selenium.WebDriver frame​(int index)
        Specified by:
        frame in interface org.openqa.selenium.WebDriver.TargetLocator
      • frame

        public org.openqa.selenium.WebDriver frame​(java.lang.String nameOrId)
        Specified by:
        frame in interface org.openqa.selenium.WebDriver.TargetLocator
      • frame

        public org.openqa.selenium.WebDriver frame​(org.openqa.selenium.WebElement frameElement)
        Specified by:
        frame in interface org.openqa.selenium.WebDriver.TargetLocator
      • parentFrame

        public org.openqa.selenium.WebDriver parentFrame()
        Specified by:
        parentFrame in interface org.openqa.selenium.WebDriver.TargetLocator
      • defaultContent

        public org.openqa.selenium.WebDriver defaultContent()
        Specified by:
        defaultContent in interface org.openqa.selenium.WebDriver.TargetLocator
      • activeElement

        public org.openqa.selenium.WebElement activeElement()
        Specified by:
        activeElement in interface org.openqa.selenium.WebDriver.TargetLocator
      • alert

        public org.openqa.selenium.Alert alert()
        Specified by:
        alert in interface org.openqa.selenium.WebDriver.TargetLocator
      • innerFrame

        public org.openqa.selenium.WebDriver innerFrame​(java.lang.String... frames)
        Switch to the inner frame (last child frame in given sequence)
      • window

        public org.openqa.selenium.WebDriver window​(int index)
        Switch to window/tab by index NB! Order of windows/tabs can be different in different browsers, see Selenide tests.
        Parameters:
        index - index of window (0-based)
      • window

        public org.openqa.selenium.WebDriver window​(java.lang.String nameOrHandleOrTitle)
        Switch to window/tab by name/handle/title
        Specified by:
        window in interface org.openqa.selenium.WebDriver.TargetLocator
        Parameters:
        nameOrHandleOrTitle - name or handle or title of window/tab
      • windowByTitle

        protected static org.openqa.selenium.WebDriver windowByTitle​(org.openqa.selenium.WebDriver driver,
                                                                     java.lang.String title)
        Switch to window/tab by name/handle/title except some windows handles
        Parameters:
        title - title of window/tab