1 Reply Latest reply on Nov 24, 2015 10:58 AM by Matous Jobanek

    Arquillian Graphene sessions in JSF

    Thomas Peeters Newbie

      Hey,

       

      Using "Graphene.guardAjax(webElement).click(); seems to work initially.  First time I use it it does open a page as expected.  But from there I'd like to manipulate the newly opened webpage in order to do a more thorough test, which doesn't work anymore.

       

      So on the opened page I try guardAjax(checkboxWebelement).click();  This breaks the session.  When I take a screenshot after that the 'session expired' page is there, which is caused by a ViewExpiredException. 

       

      This means that I cannot use Graphene based operations after the JSF page is opened.  I can still do a normal click on a checkbox, and after that any other click anywhere on any WebElement breaks the test.  When not using a Graphene operation the page is still ok according to the screenshot but any usage of any WebElement after that, as said, doesn't work anymore.  The webelement can't be found anymore, eventhough a screenshot shows that it is still there.

       

      I tried to use the switch in arquillian.xml to reuse sessions like this:

       

      ...

      <extension qualifier="webdriver">

        <property name="browser">phantomjs</property>

        <property name="remoteReusable">true</property>

      </extension>

      ...

       

      But this gives the following exception

       

      org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure

       

      Any ideas? :-)