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

com.github.mkolisnyk.sirius.client.ui.controls.Edit Maven / Gradle / Ivy

The newest version!
package com.github.mkolisnyk.sirius.client.ui.controls;

import org.openqa.selenium.By;

import com.github.mkolisnyk.sirius.client.Configuration;
import com.github.mkolisnyk.sirius.client.ui.Page;

public class Edit extends Control {

    public Edit(Page parentValue, By locatorValue) {
        super(parentValue, locatorValue);
    }

    public void setText(String value) throws Exception {
        if (Configuration.platform().isAndroidNative()) {
            this.getParent().hideKeyboard();
        }
        this.click();
        this.element().clear();
        this.element().sendKeys(value);
        if (Configuration.platform().isAndroidNative()) {
            this.getParent().hideKeyboard();
        }
    }

    @Override
    public String getText() {
        return super.element().getAttribute("value");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy