package cz.moneta.test.harness.support.web;

import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Executes the given JavaScript in the Selenium WebDriver.<br>
 *
 * <u>Example:</u>
 *    <pre>
 *        //When above code is executed, it will scroll down by 600 pixels.
 *         {@literal @}ExecuteJavaScript ("window.scrollBy(0,600)")
 *          SomePage executeJavaScript();
 *    </pre>
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Repeatable(ExecuteJavaScripts.class)
public @interface ExecuteJavaScript {
    /**
     * Javascript code.
     */
    String value();
}
