3 Replies Latest reply on Jul 26, 2016 2:51 AM by wlf2kme

    JSF, Graphene, Drone, Selenium: difficulties with AJAX events

    wlf2kme

      I'm attempting to test a JSF2 + RF4 application using Graphene2, which I can't say is going very smoothly.

       

      The page I'm trying to test has several AJAX actions which re-renders some components and/or adds data to WebElements.

       

      So in that context, there's a table with a number of checkboxes.  When one of those checkboxes gets checked, a valuechangelistener kicks in to add data to a ManagedBean and re-renders a table on the bottom of the page.  This behaviour works when done manually.

      However when trying to test this with the above mentioned test tools, which also includes ShrinkWrap it only sporadically works.  Whatever I try doens't seem to have any influence on the success rate of the test.  It works about 20% of the time, while other valuechangelisteners never seem to kick in.

       

      Versions of the jars I use:

       

      <version.jboss_javaee6_spec>2.0.0.Final</version.jboss_javaee6_spec>

      <version.jboss.bom>1.0.7.Final</version.jboss.bom>

      <version.org.jboss.arquillian>1.1.11.Final</version.org.jboss.arquillian>

      <version.org.jboss.arquillian.drone>2.0.0.Final</version.org.jboss.arquillian.drone>

      <version.org.jboss.arquillian.graphene2>2.1.0.CR2</version.org.jboss.arquillian.graphene2>

      <version.selenium>2.52.0</version.selenium>

       

      This behaviour is already a lot better ever since I've been using these newer versions of Selenium and Graphene.  Browser is phantomjs, which gives me the highest success rate.

       

      Using Graphene.guardAjax or not does not seem to change anything specific either.  Waiting, implicit or explicit doesn't make a difference either.

       

      I'm starting to run out of ideas.  If anyone has some suggestions, I'll gladly try it.