Unfortunately, as far as I know, this project has no documentation around how to run its own tests (how to configure environments, which to run, etc.). Therefore, I set out to make these two runners pass:
test/cf9/run.cfm - Selenium-RC: Runs on Lucee 4 and ACF11.
test/v2/run.cfm - WebDriver: Runs on Lucee 4 and ACF11.
I've managed to resolve the conflicts, fix some brittle old tests, update some libraries, and fix some cross-engine compatibility problems.
Caveats
I figure none of these should preclude a merge, but here they are.
It seems that CFSelenium was developed on Macs, with a Windows VM. I'm working on Windows, directly. To get things smooth on both environments, we may need to collaborate to get some configuration functionality set up. (So we can change some salient settings--e.g., hosts, etc.--from a central location.)
I have to start the Selenium server manually, _as the user administrator_, in order to get local IE tests working properly - java -jar e:\www\cfselenium\Selenium-RC\selenium-server-standalone-2.53.0.jar. Otherwise, I get errors* during the IE tests.
test/v2/run.cfm (WebDriver) tests only work on ACF11+. On lower versions, I get errors\ that seem to point to old, incompatible versions of httpclient. I'm not going to bother to get all that up and running in another class loader (since I don't even use ACF), but someone else can look into that later.
* IE problem when server not run as admin
Despite trying to disable all popup blocking, I got:
Location bar shows something like this: C:\Users\15037\AppData\Local\Temp\customProfileDir8ebab3bd6c3b404e8b0678899ba0f205\core\Blank.html
...and an error dialog of:
Error: Couldn't open app window; is the pop-up blocker enabled?
URL: file:///C:/Users/15037/AppData/Local/Temp/customProfileDir8ebab3bd6c3b404e8b0678899ba0f205/core/scripts/htmlutils.js`
Do you want to continue running scripts on this page?
\ ACF 10- problems with WebDriver
2016-05-30 23:14:42 ERROR io.undertow.request UT005023: Exception handling request to /test/v2/run.cfm
java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:71)
at org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:57)
at org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:60)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:252)
at org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.<init>(ApacheHttpClient.java:229)
at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:96)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:70)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:58)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:87)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at coldfusion.runtime.java.JavaProxy.createObjectWithDefaultConstructor(JavaProxy.java:201)
at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:92)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432)
at cfWebDriver2ecfc1245721728$funcQUIT.runFunction(E:\www\cfselenium\drivers\WebDriver.cfc:64)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432)
at cfseleniumTest2ecfc1021856150$funcISFIREFOXDRIVERONINITTEST.runFunction(E:\www\cfselenium\test\v2\seleniumTest.cfc:35)
Lampei's old pull request languished due to conflicts.
Unfortunately, as far as I know, this project has no documentation around how to run its own tests (how to configure environments, which to run, etc.). Therefore, I set out to make these two runners pass:
test/cf9/run.cfm
- Selenium-RC: Runs on Lucee 4 and ACF11.test/v2/run.cfm
- WebDriver: Runs on Lucee 4 and ACF11.I've managed to resolve the conflicts, fix some brittle old tests, update some libraries, and fix some cross-engine compatibility problems.
Caveats
I figure none of these should preclude a merge, but here they are.
administrator
_, in order to get local IE tests working properly -java -jar e:\www\cfselenium\Selenium-RC\selenium-server-standalone-2.53.0.jar
. Otherwise, I get errors* during the IE tests.test/v2/run.cfm
(WebDriver) tests only work on ACF11+. On lower versions, I get errors\ that seem to point to old, incompatible versions ofhttpclient
. I'm not going to bother to get all that up and running in another class loader (since I don't even use ACF), but someone else can look into that later.* IE problem when server not run as admin
Despite trying to disable all popup blocking, I got:
Location bar shows something like this:
C:\Users\15037\AppData\Local\Temp\customProfileDir8ebab3bd6c3b404e8b0678899ba0f205\core\Blank.html
...and an error dialog of:
\ ACF 10- problems with WebDriver