spring.spring-selenium-saucelabs.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:ctx="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <description>Robot Selenium Keywords</description> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="ignoreUnresolvablePlaceholders" value="true"/> <property name="locations"> <list> <value>classpath:jspringbot.properties</value> </list> </property> </bean> <bean id="desiredCapabilities" class="org.openqa.selenium.remote.DesiredCapabilities"/> <bean id="sauceOnDemandAuthentication" class="com.saucelabs.common.SauceOnDemandAuthentication"> <property name="username" value="${selenium.saucelabs.username}"/> <property name="accessKey" value="${selenium.saucelabs.accesskey}"/> </bean> <bean class="org.jspringbot.keyword.selenium.DesiredCapabilitiesBean"> <constructor-arg ref="desiredCapabilities"/> <property name="browserName" value="${selenium.browser}"/> <property name="platform" value="${selenium.os}"/> <property name="version" value="${selenium.browser.version:none}"/> <property name="deviceName" value="${selenium.device.name:none}"/> <property name="deviceOrientation" value="${selenium.device.orientation:none}"/> <property name="name" value="${selenium.saucelabs.name:jspringbot}"/> <property name="build" value="${selenium.saucelabs.build:none}"/> <property name="tunnelId" value="${selenium.saucelabs.tunnel.id:none}"/> <property name="baseDir" value="${selenium.base.dir:none}"/> <property name="proxy" value="${selenium.proxy:none}"/> <property name="httpProxy" value="${selenium.http.proxy:none}"/> <property name="sslProxy" value="${selenium.ssl.proxy:none}"/> </bean> <bean id="webdriver" class="org.openqa.selenium.remote.RemoteWebDriver" destroy-method="quit"> <constructor-arg type="java.net.URL" value="${selenium.saucelabs.url}"/> <constructor-arg ref="desiredCapabilities"/> </bean> <bean class="org.jspringbot.keyword.selenium.WebDriverWaitBean"> <constructor-arg ref="webdriver"/> <property name="implicitWaitInSeconds" value="${selenium.implicit.wait:30}"/> <property name="pageLoadWaitInSeconds" value="${selenium.page.wait:30}"/> <property name="scriptWaitInSeconds" value="${selenium.script.wait:30}"/> <property name="downloadTimeoutInSeconds" value="${selenium.download.timeout:10}"/> </bean> <bean id="helper" class="org.jspringbot.keyword.selenium.SeleniumHelper"> <constructor-arg ref="webdriver"/> <property name="jqueryLink" value="${selenium.jquery.link:https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js}"/> <property name="implicitWaitInSeconds" value="${selenium.implicit.wait:30}"/> <property name="screenCaptureDir" value="${selenium.screenshot.folder}"/> </bean> <bean class="org.jspringbot.keyword.selenium.WebDriverInitializerBean"> <constructor-arg ref="helper"/> <property name="maximize" value="${selenium.browser.maximize:false}"/> </bean> <bean class="org.jspringbot.lifecycle.LifeCycleHandlerRegistryBean"> <constructor-arg> <bean class="org.jspringbot.keyword.selenium.SauceLabsLifeCycleHandler"/> </constructor-arg> </bean> <!-- Scan components --> <ctx:component-scan base-package="org.jspringbot.keyword.selenium.web"/> <ctx:annotation-config/> </beans>