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

spring.spring-selenium-extension-firefox.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>

  <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="profile" class="org.openqa.selenium.firefox.FirefoxProfile">
    <property name="acceptUntrustedCertificates" value="${selenium.accept.untrusted.certificates:true}"/>
    <property name="assumeUntrustedCertificateIssuer" value="${selenium.assume.untrusted.certificates:true}"/>
  </bean>

  <bean class="org.jspringbot.keyword.selenium.FirefoxProfileBean">
    <constructor-arg ref="profile"/>
    <property name="downloadDirectory" value="${selenium.download.directory:/tmp/jspringbot}"/>
    <property name="downloadShowWhenStarting" value="false"/>
    <property name="downloadSaveToDisk" value="${selenium.autosave.content.type}"/>
    <property name="networkProxyHTTP" value="${selenium.network.proxy.http:none}"/>
    <property name="networkProxyHTTPPort" value="${selenium.network.proxy.http.port:3128}"/>
    <property name="networkProxyType" value="${selenium.network.proxy.type:0}"/>
    <property name="networkProxyNoProxiesOn" value="${selenium.network.proxy.no.proxies.on:none}"/>
    <property name="networkProxyShareProxySettings" value="true"/>
    <!--<property name="networkHTTPPhishyUserpassLength" value="255"/>-->
    <property name="networkAutomaticNtlmAuthTrustedURIs" value="${network.automatic-ntlm-auth.trusted-uris}"/>
    <property name="networkAutomaticNtlmAuthAllowNonFqdn" value="true"/>
    <property name="networkNtlmSendLmResponse" value="true"/>
    <property name="userAgent" value="${user.agent:none}"/>
    <property name="securityMixedContentBlockActiveContent" value="${security.block.insecure.content:true}"/>
  </bean>

  <bean id="desiredCapabilities" class="org.openqa.selenium.remote.DesiredCapabilities"/>

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

  <bean class="com.jspringbot.selenium.extension.DesiredCapabilitiesBean">
    <constructor-arg ref="desiredCapabilities"/>
    <property name="firefoxProfile" ref="profile"/>
    <property name="proxy" value="${selenium.proxy:none}"/>
    <property name="httpProxy" value="${selenium.http.proxy:none}"/>
    <property name="sslProxy" value="${selenium.ssl.proxy:none}"/>
    <property name="chromeBrowserLog" value="${selenium.chrome.browser.log.level:SEVERE}"/>
  </bean>

  <bean id="firefoxOptions" class="org.openqa.selenium.firefox.FirefoxOptions"/>

  <bean class="com.jspringbot.selenium.extension.FirefoxOptionsBean">
    <constructor-arg ref="firefoxOptions"/>
    <property name="firefoxProfile" ref="profile"/>
    <property name="isHeadless" value="${selenium.is.headless:false}"/>
    <property name="geckoDriverVersion" value="${selenium.gecko.driver.version:0.19.1}"/>
    <property name="baseDir" value="${selenium.base.dir:none}"/>
    <property name="geckoDrivers">
      <map>
        <entry key="Windows" value="${selenium.gecko.driver.url.download:https://github.com/mozilla/geckodriver/releases/download}/v${selenium.gecko.driver.version:0.19.1}/geckodriver-v${selenium.gecko.driver.version:0.19.1}-win32.zip"/>
        <entry key="MacOS" value="${selenium.gecko.driver.url.download:https://github.com/mozilla/geckodriver/releases/download/}v${selenium.gecko.driver.version:0.19.1}/geckodriver-v${selenium.gecko.driver.version:0.19.1}-macos.tar.gz"/>
        <entry key="Linux" value="${selenium.gecko.driver.url.download:https://github.com/mozilla/geckodriver/releases/download/}v${selenium.gecko.driver.version:0.19.1}/geckodriver-v${selenium.gecko.driver.version:0.19.1}-linux64.tar.gz"/>
      </map>
    </property>
  </bean>

  <bean id="webdriver" class="org.openqa.selenium.firefox.FirefoxDriver" destroy-method="quit">
    <constructor-arg ref="firefoxOptions"/>
  </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}"/>
    <property name="autoZoomIn" value="${selenium.browser.auto.zoom.in:0}"/>
    <property name="autoZoomOut" value="${selenium.browser.auto.zoom.out:0}"/>
  </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" destroy-method="closeSession">
    <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