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

org.sitoolkit.wt.domain.operation.appium.SpinOperation Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
package org.sitoolkit.wt.domain.operation.appium;

import org.openqa.selenium.WebElement;
import org.sitoolkit.wt.domain.evidence.MessagePattern;
import org.sitoolkit.wt.domain.operation.selenium.SeleniumOperation;
import org.sitoolkit.wt.domain.operation.selenium.SeleniumOperationContext;
import org.sitoolkit.wt.domain.testscript.Locator;
import org.sitoolkit.wt.domain.testscript.TestStep;
import org.springframework.stereotype.Component;

@Component
public class SpinOperation extends SeleniumOperation {

    @Override
    public void execute(TestStep testStep, SeleniumOperationContext ctx) {
        WebElement element = findElement(testStep.getLocator());
        element.click();

        switch (testStep.getDataType()) {
        default:
            findElement(Locator.build(testStep.getDataType(), testStep.getValue())).click();
            break;
        }

        ctx.info(element, MessagePattern.項目にXXをYYします, testStep.getValue() + "の選択肢", "選択");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy