com.paypal.selion.annotations.WebTest Maven / Gradle / Ivy
/*-------------------------------------------------------------------------------------------------------------------*\
| Copyright (C) 2014-15 PayPal |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance |
| with the License. |
| |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software distributed under the License is distributed |
| on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for |
| the specific language governing permissions and limitations under the License. |
\*-------------------------------------------------------------------------------------------------------------------*/
package com.paypal.selion.annotations;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Interface creates annotation WebTest and specified parameters
* Annotation @Webtest will let Grid know to open browser instance and start a session. This can be used both in the
* Test method and the Test Class. When used in the class, then all the tests within the class share the same session
* (Session Sharing)
*/
@Retention(RUNTIME)
@Target({ CONSTRUCTOR, METHOD, TYPE })
public @interface WebTest {
/**
* Establish browser profile to use. Will default to "firefox". Example
*
*
* @Test()
* @WebTest(browser = "*iexplore")
* public void webtest2() {
* Grid.open("http://paypal.com");
* }
*
*/
String browser() default "";
/**
* Provide additional capabilities that you may wish to add as a name value pair. Values of true or false will be
* treated as Boolean capabilities unless you surround the value with '
*
*
* {@literal @}Test
* {@literal @}WebTest(additionalCapabilities={"key1:value1","key2:value2"})
* public void testMethod(){
* //UI navigation steps
* }
*
*/
String[] additionalCapabilities() default {};
/**
* Define the height of the browser window that will be spawned
*
* The width also has to be provided else the height is ignored
*
*
* {@literal @}Test
* {@literal @}WebTest(browserHeight="height")
* public void testMethod(){
* //UI navigation steps
* }
*
*/
int browserHeight() default 0;
/**
* Define the Width of the browser window that will be spawned
*
* The height also has to be provided else the width is ignored
*
*
* {@literal @}Test
* {@literal @}WebTest(browserWidth="width")
* public void testMethod(){
* //UI navigation steps
* }
*
*/
int browserWidth() default 0;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy