0

I am trying to have the same integration test for a web app with multiple browsers (Chrome, Firefox, InternetExplorer, etc. one after the other).

ScalaTest plus Play has these traits AllBrowsersPerTest and AllBrowsersPerSuite. Did anyone wrote something similar but not tied to a web framework? (The web app I am testing is based on Wicket, not Play.)

Marcus
  • 1,857
  • 4
  • 22
  • 44

1 Answers1

0

I was able to solve my problem using PageObject.

PageObject uses all available browsers (i.e. those with a configured WebDriver) by default (in my case Firefox, Chrome and Internet Explorer).

These are my dependencies:

<dependency>
    <groupId>org.pageobject</groupId>
    <artifactId>scalatest_${scalaBinaryVersion}</artifactId>
    <version>0.1.0</version>
</dependency>
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.0.1</version>
</dependency>

I found the code of PageObjectTour helpful to get started.

Note: PageObject 0.1.0 uses its own version of ScalaTest 3.0.0 because of a bug not yet fixed in the ScalaTest trunk. So I had to remove my own dependencies to org.scalatest:scalatest.

Marcus
  • 1,857
  • 4
  • 22
  • 44