View Javadoc

1   package com.atlassian.pageobjects.browser;
2   
3   import javax.annotation.Nonnull;
4   import java.lang.annotation.ElementType;
5   import java.lang.annotation.Retention;
6   import java.lang.annotation.RetentionPolicy;
7   import java.lang.annotation.Target;
8   
9   /**
10   * Marks elements that should only be called if the current test browser matches any of the given browsers.
11   *
12   * @since 2.1
13   */
14  @Retention(RetentionPolicy.RUNTIME)
15  @Target({ ElementType.METHOD, ElementType.TYPE, ElementType.PACKAGE })
16  public @interface RequireBrowser
17  {
18      /**
19       * @return list of browsers that the current browser should match
20       */
21      @Nonnull
22      Browser[] value() default {Browser.ALL};
23  
24      /**
25       * @return reason for requiring the specified browser
26       * @since 2.2
27       */
28      @Nonnull
29      String reason() default ("No reason provided");
30  }