The test hangs when trying to navigate to a URL using Fluentlenium in Firefox. Switching to HtmlUnit also results in a hang on a specific page. Angular.js is suspected to be the cause of the issue. Updating Selenium and jQuery resolved the problem, with jQuery 1.9.0 found to be incompatible and downgrading to 1.8.3 fixing the hang.
1 of 3
More Related Content
Fluentlenium Functional tests hang.pdf
1. Fluentlenium Functional tests hang
Asked by Tony Childs on 2013-04-10T18:55:29-04:00
I've got a simple test that should start a browser and go to a URL, but it
hangs:
@Test
public void runInBrowser() {
running(testServer(9000), FIREFOX, new Callback() {
public void invoke(TestBrowser browser) {
browser.goTo("http://localhost:3333/admin");
});
Firefox starts and then the test just hangs without navigating to the URL
provided. I see only the following console log (INFO)
[37minfo [0m] play - datasource [jdbc:db2://url-removed] bound to JNDI as
DefaultDS
[ [37minfo [0m] o.h.a.c.Version - HCANN000001: Hibernate Commons
Annotations {4.0.1.Final}
[ [37minfo [0m] o.h.Version - HHH000412: Hibernate Core {4.1.7.Final}
[ [37minfo [0m] o.h.c.Environment - HHH000206: hibernate.properties not
found
[ [37minfo [0m] o.h.c.Environment - HHH000021: Bytecode provider name :
javassist
[ [37minfo [0m] o.h.d.Dialect - HHH000400: Using dialect:
org.hibernate.dialect.DB2Dialect
[ [37minfo [0m] o.h.e.j.i.LobCreatorBuilder - HHH000423: Disabling
contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
[ [37minfo [0m] o.h.e.t.i.TransactionFactoryInitiator - HHH000268:
Transaction strategy:
org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory
[ [37minfo [0m] o.h.h.i.a.ASTQueryTranslatorFactory - HHH000397: Using
ASTQueryTranslatorFactory
[ [37minfo [0m] o.h.v.i.u.Version - HV000001: Hibernate Validator
4.3.0.Final
[ [37minfo [0m] application - Application has started
[ [37minfo [0m] application - DEVELOPMENT
The same test runs when I use HTMLUNIT in place of FIREFOX. Any tips would
be appreciated.
Thanks,
Tony
Archives
Framework
Play Framework
Apr 10, 2013
Week 15, 2013
MarsHut Page 1/3
2. Fluentlenium Functional tests hang
April, 2013
Year 2013
All Answers
Answer by Tony Childs on 2013-04-11T13:13:57-04:00
I've now noticed that HTMLUNIT also hangs when I go to /admin/people. I'm
wondering if Angular.js has anything to do with it
Answer by Max Begenau on 2013-04-11T15:17:11-04:00
Hi Tony,
as far as I can see AngularJS has been tested with IE8 and above. The
default HtmlUnitDriver browser used by play is Internet Explorer 7(The current
trunkof HtmlUnit uses IE8 as default). So yes, problems can arise from
JavaScript (also have a look at this
blog
post I found).
I encountered hangs when using HTMLUNIT with my jQuery based application,
but in contrast to your case the FIREFOX WebDriver worked flawlessly*. You
may try using HTMLUNIT with Firefox browser version. To do so, use:
FluentAdapter ff10_browser = new FluentAdapter(new HtmlUnitDriver(
BrowserVersion.FIREFOX_10))
*What Firefox version do you use? Selenium tries to install an Add-On to
Firefox, but the shipped xpi is not compatible with recent browser. To
update, add the following line to your Build.scala:
"org.seleniumhq.selenium" % "selenium-java" % "2.31.0",
Good luck!
Max
Answer by Mathilde Rigabert Leme??e on 2013-04-11T16:18:19-04:00
Hi Tony,
selenium-java 2.32.0 have been released so same as Max except for the
version
"org.seleniumhq.selenium" % "selenium-java" % "2.32.0",
Does that work ?
Mathilde
Le jeudi 11 avril 2013 00:55:29 UTC+2, Tony Childs a ??crit :
Answer by Tony Childs on 2013-04-12T15:13:01-04:00
Turns out that it was a problem with jQuery 1.9.0. We downgraded to 1.8.3
and it seems to be working so far.
MarsHut Page 2/3
3. Fluentlenium Functional tests hang
Tagged
Fluentlenium Functional Tests
Hibernate Core
Hibernate Validator
Public Void Invoke
Reported Jdbc Version
Related
Play Framework 2.1.1 Streaming through Websockets
Change DB Application Configuration at Runtime
ClassCastException when testing Controller with @Authenticated and Guice
How to modify or decorate Http.Request Object
Help on debugging compilation errors from macros
MyBatis-Guice configuration with Play 2.1 - Mapped Statements collection does not contain value
Cannot get FluentLenium browser to goto localhost
Deprecated routeAndCall() with random errors. route() produces NullPointerException
JPA with multiple persistenceUnit
Validate the password and confirmation passwords match
View Online
http://www.marshut.com/ikqpy/fluentlenium-functional-tests-hang.html
MarsHut Page 3/3