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

spring.spring-selenium-extension-chrome.xml Maven / Gradle / Ivy

Go to download

This is a supporting library for jspringbot to use Browserstack and other selenium events

There is a newer version: 2.29
Show newest version
<?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>

  <import resource="spring-selenium-common.xml"/>

  <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"
        factory-method="chrome"/>

  <bean class="com.jspringbot.selenium.extension.DesiredCapabilitiesBean">
    <constructor-arg ref="desiredCapabilities"/>
    <property name="chromeDriverVersion" value="${selenium.chrome.driver.version:2.33}"/>
    <property name="baseDir" value="${selenium.base.dir:none}"/>
    <property name="chromeDrivers">
      <map>
        <entry key="Windows" value="${selenium.chrome.driver.url.download:http://chromedriver.storage.googleapis.com/}${selenium.chrome.driver.version:2.33}/chromedriver_win32.zip"/>
        <entry key="MacOS" value="${selenium.chrome.driver.url.download:http://chromedriver.storage.googleapis.com/}${selenium.chrome.driver.version:2.33}/chromedriver_mac64.zip"/>
        <entry key="Linux" value="${selenium.chrome.driver.url.download:http://chromedriver.storage.googleapis.com/}${selenium.chrome.driver.version:2.33}/chromedriver_linux#{systemProperties['sun.arch.data.model']}.zip"/>
      </map>
    </property>
    <property name="chromeDeviceEmulation" value="${selenium.chrome.mobile.device:none}"/>
    <property name="chromeDeviceMetrics" value="${selenium.chrome.mobile.device.metrics:none}"/>
    <property name="chromeDeviceUserAgent" value="${selenium.chrome.mobile.device.user.agent:none}"/>
    <property name="chromeBrowserLog" value="${selenium.chrome.browser.log.level:none}"/>
    <property name="chromePerformanceLog" value="${selenium.chrome.performance.log.level:none}"/>
    <property name="chromeLogFile" value="${selenium.chrome.webdriver.logfile: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>

  <import resource="spring-browser-mob-proxy.xml"/>

  <bean id="webdriver" class="org.openqa.selenium.chrome.ChromeDriver" destroy-method="quit">
    <constructor-arg ref="desiredCapabilities"/>
  </bean>

  <bean class="org.jspringbot.keyword.selenium.ChromeDriverDisposableBean">
    <constructor-arg ref="webdriver"/>
    <property name="chromePrefLogDir" value="${selenium.chrome.pref.log.dir:none}"/>
  </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 id="extensionHelper" class="com.jspringbot.selenium.extension.SeleniumExtensionHelper">
    <constructor-arg ref="webdriver"/>
  </bean>

  <bean id="utilityHelper" class="com.jspringbot.selenium.extension.UtilityHelper" />


  <!-- Scan components -->
  <ctx:component-scan base-package="org.jspringbot.keyword.selenium.web, com.jspringbot.selenium.extension.keyword"/>
  <ctx:annotation-config/>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy