Class LocatorMap


  • public class LocatorMap
    extends Object
    Map to hold element locators.
    • Constructor Detail

      • LocatorMap

        public LocatorMap()
        Default constructor.
      • LocatorMap

        public LocatorMap​(Map<String,​Map<String,​Map<String,​String>>> map,
                          Properties staticPlaceholders)
        Construct a locator map from an existing Map object.
        Parameters:
        map - locator map
        staticPlaceholders - static placeholders to be replaced in any locator
    • Method Detail

      • getLocator

        public com.codeborne.selenide.SelenideElement getLocator​(String key,
                                                                 Platform platform,
                                                                 Object... params)
        Get a Selenide locator.
        Parameters:
        key - locator key
        platform - platform
        params - locator key parameters
        Returns:
        SelenideElement
      • getCollectionLocator

        public com.codeborne.selenide.ElementsCollection getCollectionLocator​(String key,
                                                                              Platform platform,
                                                                              Object... params)
        Get a Selenide collection locator.
        Parameters:
        key - locator key
        platform - platform
        params - locator key parameters
        Returns:
        ElementsCollection
      • getRawLocator

        public org.apache.commons.lang3.tuple.Pair<String,​String> getRawLocator​(String key,
                                                                                      Platform platform,
                                                                                      Object... params)
        Get the raw locator (type and value). This is exposed to be used for logging purposes.
        Parameters:
        key - locator key
        platform - platform
        params - locator key parameters
        Returns:
        Pair