t.jspringbot-selenium.1.3.source-code.libdoc.intro Maven / Gradle / Ivy
JSpringBot Selenium Library for Robot Framework.
= Configuration =
Configure the following to use jspringbot-selenium.
1. Add this artifact in maven dependency
|
|
| org.jspringbot
| jspringbot-selenium
|
|
2. Import any of the following support in {{jspringbot-global.xml}}
For Firefox Support:
|
For Selenium Hub Support:
|
For Image Compare Support:
|
For Site Catalyst Support:
|
3. A {{jspringbot.properties}} file should exist in resources. See the possible properties below.
| *Key* | *Default Value* | *Description* |
| {{selenium.implicit.wait}} | 30 | Specify the amount of time the driver should wait when searching for an element if it is not immediately present. |
| {{selenium.screenshot.folder}} | | Directory to place captured screenshots. |
| {{selenium.download.directory}} | /tmp/jspringbot | Directory to place downloads. |
| {{selenium.autosave.content.type}} | | Specify the valid file types to be downloaded. |
| *Untrusted Certificate Properties* | | |
| {{selenium.accept.untrusted.certificates}} | true | Accepts untrusted SSL certificates. |
| {{selenium.assume.untrusted.certificates}} | true | Assume untrusted certificates will come from untrusted issuers. |
| *Proxy Properties* | | |
| {{selenium.proxy}} | none | Specify which proxy to use. |
| {{selenium.http.proxy}} | none | Specify which proxy to use for HTTP connections. |
| {{selenium.https.proxy}} | none | Specify which proxy to use for HTTPS connections. |
| {{selenium.ssl.proxy}} | none | Specify which proxy to use for SSL connections. |
| {{selenium.network.proxy.http}} | none | Specify which proxy host or ip to use for the firefox profile |
| {{selenium.network.proxy.http.port}} | 3128 | Specify which port the proxy is using for the firefox profile |
| {{selenium.network.proxy.type}} | 0 | Signifies default proxy configuration for the firefox profile |
| {{selenium.network.proxy.no.proxies.on}} | none | Networks where proxy is not necessary for the firefox profile i.e., exceptions |
| *Firefox Profile* | | |
| {{network.automatic-ntlm-auth.trusted-uris}} | | This preference determines which sites are allowed to automatically authenticate via NTLM. If the user requests a site that authenticates with NTLM that is not in this list, the user will be prompted for login details. |
| {{user.agent}} | | Overrides Firefox User Agent |
| *Selenium Hub Properties* | | |
| {{selenium.grid.url}} | | Specifies the url where Selenium Grid is configured |
| {{selenium.grid.browserName}} | | Specifies the Selenium Grid Browser to use (ie. firefox, intenet explorer, chrome, etc) |
| {{selenium.grid.platform}} | | Specifies the Selenium Grid Platform (ie. XP, VISTA, etc) |
| {{selenium.grid.version}} | | Specifies the Selenium Grid Version |
| *Image Compare Properties* | | |
| {{selenium.compare.threshold}} | 0.0001 | Image difference threshold |
| {{selenium.compare.image.collect.dir}} | | Directory to place collected screenshots |
| {{selenium.compare.icompare.file}} | | iCompare tool file directory |
| {{selenium.compare.output.dir}} | | Result output directory |
| {{selenium.compare.base.dir}} | | Image baseline directory |
| {{selenium.compare.environment.path}} | | Environment path include path for nodejs and graphicsmagick |
| *Omniture Site Catalyst Automation Properties* | | |
| {{omniture.debugger.location}} | http://sitecatalyst.omniture.com/sc_tools/stats_debugger.html | Third party stats debugger tool. If this becomes unavailable in the future, override the value with the new location. |
| {{omniture.debugger.wait.time.in.millis}} | 3000 | Wait time for URL-decoding of site catalyst variables and copying of html source of the stats debugger window. |
*Sample jspringbot.properties*
| selenium.screenshot.folder=${project.build.directory }/robotframework-reports
| selenium.download.directory=/tmp/selenium
| selenium.autosave.content.type=application/octet-stream;application/vnd.apple.installer+xml
| selenium.proxy=none
| selenium.http.proxy=none
| selenium.https.proxy=none
| selenium.ssl.proxy=none
| selenium.implicit.wait=10
| selenium.network.proxy.http=none
| selenium.network.proxy.http.port=3128
| selenium.network.proxy.type=0
| selenium.network.proxy.no.proxies.on=localhost, 127.0.0.1
*Sample jspringbot.properties with Firefox Profile support*
| #For iPhone - OS 6
| user.agent=Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25
*Sample jspringbot.properties with Firefox Profile support to Bypass HTTP Authentication*
| network.automatic-ntlm-auth.trusted-uris=www.foo.bar
|
| #Sample test case usage
| Navigate to https://username:[email protected]
*Sample jspringbot.properties with Selenium Hub support*
| selenium.grid.url=http://localhost:4444/wd/hub
| selenium.grid.browserName=internet explorer
| selenium.grid.platform=XP
| selenium.grid.version=
*Sample jspringbot.properties with Image Compare Support*
| selenium.compare.threshold=0.0001
| selenium.compare.image.collect.dir=${project.basedir}/src/test/resources/imgbaseline/local-firefox
| selenium.compare.icompare.file=/icompare_v0.1/icompare.js
| selenium.compare.output.dir=${project.build.directory}/robotframework-reports
| selenium.compare.base.dir=${project.build.directory}/test-classes/imgbaseline/local-firefox/
| selenium.compare.environment.path=
*Sample jspringbot.properties with Site Catalyst (Omniture) Support*
| omniture.debugger.location=http://sitecatalyst.omniture.com/sc_tools/stats_debugger.html
| omniture.debugger.wait.time.in.millis=2000
*Sample selenium.autosave.content.type Configuration for Different File Types*
| *File Extension* | *Mime Type* | *Meaning* |
| exe | application/x-msdos-program | |
| dmg | application/x-apple-diskimage | |
| pkg | application/octet-stream | Unrecognized or binary data |
| doc | application/msword | Microsoft Word document |
| pdf | application/pdf | Acrobat (portable document format) file |
| xls | application/vnd.ms-excel | Excel spreadsheet |
| csv | application/csv | Comma Separated Value |
| ppt | application/vnd.ms-powerpoint | PowerPoint presentation |
| gzip | application/x-gzip | Gzip archive |
| zip | application/zip | Zip archive |
| gif | image/gif | GIF image |
| jpg | image/jpeg | JPEG image |
| png | image/png | PNG image |
*Sample selenium.network.proxy.type for the firefox profile*
| 0 | Direct connection, no proxy. (Default) |
| 1 | Manual proxy configuration |
| 2 | Proxy auto-configuration (ProxyPac) |
| 4 | Auto-detect proxy settings |
*Firefox Configuration for Auto Download*
| Go to Tools > Options > General > Save file to
4. Add {{JSpringBotGlobal}} library in the in the test suite settings.
| *** Settings *** |
| Library | JSpringBotGlobal |