All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codeborne.selenide.commands.GetSelectedText Maven / Gradle / Ivy

package com.codeborne.selenide.commands;

import com.codeborne.selenide.Command;
import com.codeborne.selenide.SelenideElement;
import com.codeborne.selenide.impl.WebElementSource;
import org.openqa.selenium.WebElement;

public class GetSelectedText implements Command {
  GetSelectedOption getSelectedOption = new GetSelectedOption();
  
  @Override
  public String execute(SelenideElement proxy, WebElementSource selectElement, Object[] args) {
    WebElement option = getSelectedOption.execute(proxy, selectElement, NO_ARGS);
    return option == null ? null : option.getText();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy