Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lampei conflicts to add WebDriver #25

Merged
merged 23 commits into from
Jun 1, 2016

Conversation

jamiejackson
Copy link
Collaborator

@jamiejackson jamiejackson commented May 31, 2016

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.

  • 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 and others added 23 commits December 11, 2013 08:40
Created new unit tests.
Added runners for tests in CF7, CF8, CF9, and the version 2 items.
Renamed cf8 tests so that runner would automatically find them based on
their name.
Added 32 and 64 bit Internet Explorer drivers
Created objects corresponding to various web drivers
Renamed cf8 tests for automatic pickup by MXUnit runner
Added runners for cf7 and cf8 tests
Added unit tests for version 2 files
Renamed version 1 selenium object to webSelenium
Changed local references and used google.com
Switch tests to use firefox instead of IE for easier user testing
fix_lampei_conflicts

# Conflicts:
#	CFSeleniumTestCase.cfc
#	selenium.cfc
#	selenium_tags.cfc
#	server.cfc
#	test/cf7_cf8/cf8_waitForTest.cfc
#	test/cf7_cf8/waitForTest_cf7.cfm
#	test/cf9/readmeTest.cfc
#	test/cf9/waitForTest.cfc
lib; upgraded IE driver; replaced brittle google.com tests with local
fixture;
@jamiejackson jamiejackson changed the title Fix lampei conflicts Fix lampei conflicts to add WebDriver May 31, 2016
@ddspringle ddspringle merged commit 05b604d into teamcfadvance:master Jun 1, 2016
@ddspringle
Copy link
Member

Thank you!

@jamiejackson jamiejackson deleted the fix_lampei_conflicts branch June 3, 2016 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants