org.scalatestplus.play

OneBrowserPerSuite

trait OneBrowserPerSuite extends SuiteMixin with WebBrowser with Eventually with IntegrationPatience with BrowserFactory

Trait that provides a new Selenium WebBrowser instance per ScalaTest Suite.

This SuiteMixin trait's overridden run method places a reference to the WebDriver provided by webDriver under the key org.scalatestplus.play.webDriver. This allows any nested Suites to access the Suite's WebDriver as well, most easily by having the nested Suites mix in the ConfiguredBrowser trait. On the status returned by super.run, this trait's overridden run method registers a block of code to close the WebDriver to be executed when the Status completes, and returns the same Status. This ensures the WebDriver will continue to be available until all nested suites have completed, after which the WebDriver will be closed. This trait also overrides Suite.withFixture to cancel tests automatically if the related WebDriver is not available on the host platform.

This trait's self-type, ServerProvider, will ensure a TestServer and FakeApplication are available to each test. The self-type will require that you mix in either OneServerPerSuite, OneServerPerTest, ConfiguredServer before you mix in this trait. Your choice among these three ServerProviders will determine the extent to which one or more TestServers are shared by multiple tests.

Here's an example that shows demonstrates of the services provided by this trait. Note that to use this trait, you must mix in one of the driver factories (this example mixes in FirefoxFactory):

package org.scalatestplus.play.examples.onebrowserpersuite

import play.api.test._ import org.scalatest._ import org.scalatestplus.play._ import play.api.{Play, Application}
class ExampleSpec extends PlaySpec with OneServerPerSuite with OneBrowserPerSuite with FirefoxFactory {
// Override app if you need a FakeApplication with other than non-default parameters. implicit override lazy val app: FakeApplication = FakeApplication( additionalConfiguration = Map("ehcacheplugin" -> "disabled"), withRoutes = TestRoute )
"The OneBrowserPerSuite trait" must { "provide a FakeApplication" in { app.configuration.getString("ehcacheplugin") mustBe Some("disabled") } "make the FakeApplication available implicitly" in { def getConfig(key: String)(implicit app: Application) = app.configuration.getString(key) getConfig("ehcacheplugin") mustBe Some("disabled") } "start the FakeApplication" in { Play.maybeApplication mustBe Some(app) } "provide the port number" in { port mustBe Helpers.testServerPort } "provide an actual running server" in { import Helpers._ import java.net._ val url = new URL("http://localhost:" + port + "/boum") val con = url.openConnection().asInstanceOf[HttpURLConnection] try con.getResponseCode mustBe 404 finally con.disconnect() } "provide a web driver" in { go to ("http://localhost:" + port + "/testing") pageTitle mustBe "Test Page" click on find(name("b")).value eventually { pageTitle mustBe "scalatest" } } } }
If you have many tests that can share the same `FakeApplication`, `TestServer`, and `WebDriver`, and you don't want to put them all into one test class, you can place them into different "nested" `Suite` classes. Create a master suite that extends `OneServerPerSuite` and declares the nested `Suite`s. Annotate the nested suites with `@DoNotDiscover` and have them extend `ConfiguredBrowser`. Here's an example:
package org.scalatestplus.play.examples.onebrowserpersuite

import play.api.test._ import org.scalatest._ import tags.FirefoxBrowser import org.scalatestplus.play._ import play.api.{Play, Application}
// This is the "master" suite class NestedExampleSpec extends Suites( new OneSpec, new TwoSpec, new RedSpec, new BlueSpec ) with OneServerPerSuite with OneBrowserPerSuite with FirefoxFactory { // Override app if you need a FakeApplication with other than non-default parameters. implicit override lazy val app: FakeApplication = FakeApplication( additionalConfiguration = Map("ehcacheplugin" -> "disabled"), withRoutes = TestRoute ) }
// These are the nested suites @DoNotDiscover class OneSpec extends PlaySpec with ConfiguredServer with ConfiguredBrowser @DoNotDiscover class TwoSpec extends PlaySpec with ConfiguredServer with ConfiguredBrowser @DoNotDiscover class RedSpec extends PlaySpec with ConfiguredServer with ConfiguredBrowser
@DoNotDiscover class BlueSpec extends PlaySpec with ConfiguredServer with ConfiguredBrowser {
"The OneBrowserPerSuite trait" must { "provide a FakeApplication" in { app.configuration.getString("ehcacheplugin") mustBe Some("disabled") } "make the FakeApplication available implicitly" in { def getConfig(key: String)(implicit app: Application) = app.configuration.getString(key) getConfig("ehcacheplugin") mustBe Some("disabled") } "start the FakeApplication" in { Play.maybeApplication mustBe Some(app) } "provide the port number" in { port mustBe Helpers.testServerPort } "provide an actual running server" in { import Helpers._ import java.net._ val url = new URL("http://localhost:" + port + "/boum") val con = url.openConnection().asInstanceOf[HttpURLConnection] try con.getResponseCode mustBe 404 finally con.disconnect() } } }
It is possible to use `OneBrowserPerSuite` to run the same tests in more than one browser. Nevertheless, you should consider the approach taken by [[org.scalatestplus.play.AllBrowsersPerSuite AllBrowsersPerSuite]] and [[org.scalatestplus.play.AllBrowsersPerTest AllBrowsersPerTest]] instead, as it requires a bit less boilerplate code than `OneBrowserPerSuite` to test in multiple browsers. If you prefer to use `OneBrowserPerSuite`, however, simply place your tests in an abstract superclass, then define concrete subclasses for each browser you wish to test against. Here's an example:
package org.scalatestplus.play.examples.onebrowserpersuite

import play.api.test._ import org.scalatest._ import tags._ import org.scalatestplus.play._ import play.api.{Play, Application}
// Place your tests in an abstract class abstract class MultiBrowserExampleSpec extends PlaySpec with OneServerPerSuite with OneBrowserPerSuite {
// Override app if you need a FakeApplication with other than non-default parameters. implicit override lazy val app: FakeApplication = FakeApplication( additionalConfiguration = Map("ehcacheplugin" -> "disabled"), withRoutes = TestRoute )
"The OneBrowserPerSuite trait" must { "provide a FakeApplication" in { app.configuration.getString("ehcacheplugin") mustBe Some("disabled") } "make the FakeApplication available implicitly" in { def getConfig(key: String)(implicit app: Application) = app.configuration.getString(key) getConfig("ehcacheplugin") mustBe Some("disabled") } "start the FakeApplication" in { Play.maybeApplication mustBe Some(app) } "provide the port number" in { port mustBe Helpers.testServerPort } "provide an actual running server" in { import Helpers._ import java.net._ val url = new URL("http://localhost:" + port + "/boum") val con = url.openConnection().asInstanceOf[HttpURLConnection] try con.getResponseCode mustBe 404 finally con.disconnect() } "provide a web driver" in { go to ("http://localhost:" + port + "/testing") pageTitle mustBe "Test Page" click on find(name("b")).value eventually { pageTitle mustBe "scalatest" } } } }
// Then make a subclass that mixes in the factory for each // Selenium driver you want to test with. @FirefoxBrowser class FirefoxExampleSpec extends MultiBrowserExampleSpec with FirefoxFactory @SafariBrowser class SafariExampleSpec extends MultiBrowserExampleSpec with SafariFactory @InternetExplorerBrowser class InternetExplorerExampleSpec extends MultiBrowserExampleSpec with InternetExplorerFactory @ChromeBrowser class ChromeExampleSpec extends MultiBrowserExampleSpec with ChromeFactory @HtmlUnitBrowser class HtmlUnitExampleSpec extends MultiBrowserExampleSpec with HtmlUnitFactory
The concrete subclasses include tag annotations describing the browser used to make it easier to include or exclude browsers in specific runs. This is not strictly necessary since if a browser is not supported on the host platform the tests will be automatically canceled. For example, here's how the output would look if you ran the above tests on a platform that did not support Selenium drivers for Chrome or Internet Explorer using sbt:
> test-only *onebrowserpersuite*
[info] FirefoxExampleSpec:
[info] The OneBrowserPerSuite trait
[info] - must provide a FakeApplication
[info] - must make the FakeApplication available implicitly
[info] - must start the FakeApplication
[info] - must provide the port number
[info] - must provide an actual running server
[info] - must provide a web driver
[info] SafariExampleSpec:
[info] The OneBrowserPerSuite trait
[info] - must provide a FakeApplication
[info] - must make the FakeApplication available implicitly
[info] - must start the FakeApplication
[info] - must provide the port number
[info] - must provide an actual running server
[info] - must provide a web driver
[info] InternetExplorerExampleSpec:
[info] The OneBrowserPerSuite trait
[info] - must provide a FakeApplication !!! CANCELED !!!
[info]   Was unable to create a Selenium InternetExplorerDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must make the FakeApplication available implicitly !!! CANCELED !!!
[info]   Was unable to create a Selenium InternetExplorerDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must start the FakeApplication !!! CANCELED !!!
[info]   Was unable to create a Selenium InternetExplorerDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must provide the port number !!! CANCELED !!!
[info]   Was unable to create a Selenium InternetExplorerDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must provide an actual running server !!! CANCELED !!!
[info]   Was unable to create a Selenium InternetExplorerDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must provide a web driver !!! CANCELED !!!
[info]   Was unable to create a Selenium InternetExplorerDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] ChromeExampleSpec:
[info] The OneBrowserPerSuite trait
[info] - must provide a FakeApplication !!! CANCELED !!!
[info]   Was unable to create a Selenium ChromeDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must make the FakeApplication available implicitly !!! CANCELED !!!
[info]   Was unable to create a Selenium ChromeDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must start the FakeApplication !!! CANCELED !!!
[info]   Was unable to create a Selenium ChromeDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must provide the port number !!! CANCELED !!!
[info]   Was unable to create a Selenium ChromeDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must provide an actual running server !!! CANCELED !!!
[info]   Was unable to create a Selenium ChromeDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] - must provide a web driver !!! CANCELED !!!
[info]   Was unable to create a Selenium ChromeDriver on this platform. (OneBrowserPerSuite.scala:201)
[info] HtmlUnitExampleSpec:
[info] The OneBrowserPerSuite trait
[info] - must provide a FakeApplication
[info] - must make the FakeApplication available implicitly
[info] - must start the FakeApplication
[info] - must provide the port number
[info] - must provide an actual running server
[info] - must provide a web driver
For comparison, here is what the output would look like if you just selected tests tagged with `FirefoxBrowser` in sbt:
> test-only *onebrowserpersuite* -- -n org.scalatest.tags.FirefoxBrowser
[info] FirefoxExampleSpec:
[info] The OneBrowserPerSuite trait
[info] - must provide a FakeApplication
[info] - must make the FakeApplication available implicitly
[info] - must start the FakeApplication
[info] - must provide the port number
[info] - must provide an actual running server
[info] - must provide a web driver
[info] SafariExampleSpec:
[info] The OneBrowserPerSuite trait
[info] InternetExplorerExampleSpec:
[info] The OneBrowserPerSuite trait
[info] ChromeExampleSpec:
[info] The OneBrowserPerSuite trait
[info] HtmlUnitExampleSpec:
[info] The OneBrowserPerSuite trait

Self Type
OneBrowserPerSuite with Suite with ServerProvider
Linear Supertypes
BrowserFactory, IntegrationPatience, Eventually, PatienceConfiguration, AbstractPatienceConfiguration, ScaledTimeSpans, WebBrowser, SuiteMixin, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OneBrowserPerSuite
  2. BrowserFactory
  3. IntegrationPatience
  4. Eventually
  5. PatienceConfiguration
  6. AbstractPatienceConfiguration
  7. ScaledTimeSpans
  8. WebBrowser
  9. SuiteMixin
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final class ActiveElementTarget extends SwitchTarget[Element]

    Definition Classes
    WebBrowser
  2. final class AlertTarget extends SwitchTarget[Alert]

    Definition Classes
    WebBrowser
  3. final class Checkbox extends Element

    Definition Classes
    WebBrowser
  4. case class ClassNameQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  5. final class ColorField extends Element with ValueElement

    Definition Classes
    WebBrowser
  6. class CookiesNoun extends AnyRef

    Definition Classes
    WebBrowser
  7. case class CssSelectorQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  8. final class DateField extends Element with ValueElement

    Definition Classes
    WebBrowser
  9. final class DateTimeField extends Element with ValueElement

    Definition Classes
    WebBrowser
  10. final class DateTimeLocalField extends Element with ValueElement

    Definition Classes
    WebBrowser
  11. final class DefaultContentTarget extends SwitchTarget[WebDriver]

    Definition Classes
    WebBrowser
  12. case class Dimension extends Product with Serializable

    Definition Classes
    WebBrowser
  13. sealed trait Element extends AnyRef

    Definition Classes
    WebBrowser
  14. final class EmailField extends Element with ValueElement

    Definition Classes
    WebBrowser
  15. final class FrameElementTarget extends SwitchTarget[WebDriver]

    Definition Classes
    WebBrowser
  16. final class FrameIndexTarget extends SwitchTarget[WebDriver]

    Definition Classes
    WebBrowser
  17. final class FrameNameOrIdTarget extends SwitchTarget[WebDriver]

    Definition Classes
    WebBrowser
  18. final class FrameWebElementTarget extends SwitchTarget[WebDriver]

    Definition Classes
    WebBrowser
  19. case class IdQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  20. case class LinkTextQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  21. final class MonthField extends Element with ValueElement

    Definition Classes
    WebBrowser
  22. class MultiSel extends Element

    Definition Classes
    WebBrowser
  23. class MultiSelOptionSeq extends IndexedSeq[String]

    Definition Classes
    WebBrowser
  24. case class NameQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  25. final class NumberField extends Element with ValueElement

    Definition Classes
    WebBrowser
  26. trait Page extends AnyRef

    Definition Classes
    WebBrowser
  27. case class PartialLinkTextQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  28. final class PasswordField extends Element

    Definition Classes
    WebBrowser
  29. final case class PatienceConfig extends Product with Serializable

    Definition Classes
    AbstractPatienceConfiguration
  30. case class Point extends Product with Serializable

    Definition Classes
    WebBrowser
  31. sealed trait Query extends AnyRef

    Definition Classes
    WebBrowser
  32. final class RadioButton extends Element

    Definition Classes
    WebBrowser
  33. final class RadioButtonGroup extends AnyRef

    Definition Classes
    WebBrowser
  34. final class RangeField extends Element with ValueElement

    Definition Classes
    WebBrowser
  35. final class SearchField extends Element with ValueElement

    Definition Classes
    WebBrowser
  36. class SingleSel extends Element

    Definition Classes
    WebBrowser
  37. sealed abstract class SwitchTarget[T] extends AnyRef

    Definition Classes
    WebBrowser
  38. case class TagNameQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser
  39. final class TelField extends Element with ValueElement

    Definition Classes
    WebBrowser
  40. final class TextArea extends Element

    Definition Classes
    WebBrowser
  41. final class TextField extends Element

    Definition Classes
    WebBrowser
  42. final class TimeField extends Element with ValueElement

    Definition Classes
    WebBrowser
  43. final class UrlField extends Element with ValueElement

    Definition Classes
    WebBrowser
  44. trait ValueElement extends Element

    Definition Classes
    WebBrowser
  45. final class WeekField extends Element with ValueElement

    Definition Classes
    WebBrowser
  46. final class WindowTarget extends SwitchTarget[WebDriver]

    Definition Classes
    WebBrowser
  47. final class WrappedCookie extends AnyRef

    Definition Classes
    WebBrowser
  48. case class XPathQuery extends Query with Product with Serializable

    Definition Classes
    WebBrowser

Abstract Value Members

  1. abstract def createWebDriver(): WebDriver

    Creates a new instance of a valid Selenium WebDriver, or if a driver is unavailable on the host platform, returns a BrowserFactory.UnavailableDriver that includes the exception that indicated the driver was not supported on the host platform and an appropriate error message.

    Creates a new instance of a valid Selenium WebDriver, or if a driver is unavailable on the host platform, returns a BrowserFactory.UnavailableDriver that includes the exception that indicated the driver was not supported on the host platform and an appropriate error message.

    returns

    an new instance of a Selenium WebDriver, or a BrowserFactory.UnavailableDriver if the desired WebDriver is not available on the host platform.

    Definition Classes
    BrowserFactory
  2. abstract def expectedTestCount(filter: Filter): Int

    Definition Classes
    SuiteMixin
  3. abstract def nestedSuites: IndexedSeq[Suite]

    Definition Classes
    SuiteMixin
  4. abstract def rerunner: Option[String]

    Definition Classes
    SuiteMixin
  5. abstract def runNestedSuites(args: Args): Status

    Attributes
    protected
    Definition Classes
    SuiteMixin
  6. abstract def runTest(testName: String, args: Args): Status

    Attributes
    protected
    Definition Classes
    SuiteMixin
  7. abstract def runTests(testName: Option[String], args: Args): Status

    Attributes
    protected
    Definition Classes
    SuiteMixin
  8. abstract val styleName: String

    Definition Classes
    SuiteMixin
  9. abstract def suiteId: String

    Definition Classes
    SuiteMixin
  10. abstract def suiteName: String

    Definition Classes
    SuiteMixin
  11. abstract def tags: Map[String, Set[String]]

    Definition Classes
    SuiteMixin
  12. abstract def testDataFor(testName: String, theConfigMap: ConfigMap): TestData

    Definition Classes
    SuiteMixin
  13. abstract def testNames: Set[String]

    Definition Classes
    SuiteMixin

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val activeElement: (OneBrowserPerSuite.this)#ActiveElementTarget

    Definition Classes
    WebBrowser
  7. def addCookie(name: String, value: String, path: String, expiry: Date, domain: String, secure: Boolean)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  8. val alertBox: (OneBrowserPerSuite.this)#AlertTarget

    Definition Classes
    WebBrowser
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def captureTo(fileName: String)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  11. def checkbox(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#Checkbox

    Definition Classes
    WebBrowser
  12. def checkbox(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#Checkbox

    Definition Classes
    WebBrowser
  13. def className(className: String): (OneBrowserPerSuite.this)#ClassNameQuery

    Definition Classes
    WebBrowser
  14. def clickOn(element: (OneBrowserPerSuite.this)#Element): Unit

    Definition Classes
    WebBrowser
  15. def clickOn(queryString: String)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  16. def clickOn(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  17. def clickOn(element: WebElement): Unit

    Definition Classes
    WebBrowser
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def close()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  20. def colorField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#ColorField

    Definition Classes
    WebBrowser
  21. def colorField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#ColorField

    Definition Classes
    WebBrowser
  22. def cookie(name: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#WrappedCookie

    Definition Classes
    WebBrowser
  23. val cookies: (OneBrowserPerSuite.this)#CookiesNoun

    Definition Classes
    WebBrowser
  24. def cssSelector(cssSelector: String): (OneBrowserPerSuite.this)#CssSelectorQuery

    Definition Classes
    WebBrowser
  25. def currentUrl(implicit driver: WebDriver): String

    Definition Classes
    WebBrowser
  26. def dateField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#DateField

    Definition Classes
    WebBrowser
  27. def dateField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#DateField

    Definition Classes
    WebBrowser
  28. def dateTimeField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#DateTimeField

    Definition Classes
    WebBrowser
  29. def dateTimeField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#DateTimeField

    Definition Classes
    WebBrowser
  30. def dateTimeLocalField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#DateTimeLocalField

    Definition Classes
    WebBrowser
  31. def dateTimeLocalField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#DateTimeLocalField

    Definition Classes
    WebBrowser
  32. val defaultContent: (OneBrowserPerSuite.this)#DefaultContentTarget

    Definition Classes
    WebBrowser
  33. def deleteAllCookies()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  34. def deleteCookie(name: String)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  35. def emailField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#EmailField

    Definition Classes
    WebBrowser
  36. def emailField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#EmailField

    Definition Classes
    WebBrowser
  37. def enter(value: String)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  38. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  40. def eventually[T](fun: ⇒ T)(implicit config: (OneBrowserPerSuite.this)#PatienceConfig): T

    Definition Classes
    Eventually
  41. def eventually[T](interval: Interval)(fun: ⇒ T)(implicit config: (OneBrowserPerSuite.this)#PatienceConfig): T

    Definition Classes
    Eventually
  42. def eventually[T](timeout: Timeout)(fun: ⇒ T)(implicit config: (OneBrowserPerSuite.this)#PatienceConfig): T

    Definition Classes
    Eventually
  43. def eventually[T](timeout: Timeout, interval: Interval)(fun: ⇒ T): T

    Definition Classes
    Eventually
  44. def executeAsyncScript(script: String, args: AnyRef*)(implicit driver: WebDriver): AnyRef

    Definition Classes
    WebBrowser
  45. def executeScript[T](script: String, args: AnyRef*)(implicit driver: WebDriver): AnyRef

    Definition Classes
    WebBrowser
  46. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  47. def find(queryString: String)(implicit driver: WebDriver): Option[(OneBrowserPerSuite.this)#Element]

    Definition Classes
    WebBrowser
  48. def find(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): Option[(OneBrowserPerSuite.this)#Element]

    Definition Classes
    WebBrowser
  49. def findAll(queryString: String)(implicit driver: WebDriver): Iterator[(OneBrowserPerSuite.this)#Element]

    Definition Classes
    WebBrowser
  50. def findAll(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): Iterator[(OneBrowserPerSuite.this)#Element]

    Definition Classes
    WebBrowser
  51. def frame(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#FrameWebElementTarget

    Definition Classes
    WebBrowser
  52. def frame(element: (OneBrowserPerSuite.this)#Element): (OneBrowserPerSuite.this)#FrameElementTarget

    Definition Classes
    WebBrowser
  53. def frame(element: WebElement): (OneBrowserPerSuite.this)#FrameWebElementTarget

    Definition Classes
    WebBrowser
  54. def frame(nameOrId: String): (OneBrowserPerSuite.this)#FrameNameOrIdTarget

    Definition Classes
    WebBrowser
  55. def frame(index: Int): (OneBrowserPerSuite.this)#FrameIndexTarget

    Definition Classes
    WebBrowser
  56. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  57. def goBack()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  58. def goForward()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  59. def goTo(page: (OneBrowserPerSuite.this)#Page)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  60. def goTo(url: String)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  61. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  62. def id(elementId: String): (OneBrowserPerSuite.this)#IdQuery

    Definition Classes
    WebBrowser
  63. def implicitlyWait(timeout: Span)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  64. def interval(value: Span): Interval

    Definition Classes
    PatienceConfiguration
  65. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  66. def isScreenshotSupported(implicit driver: WebDriver): Boolean

    Definition Classes
    WebBrowser
  67. def linkText(linkText: String): (OneBrowserPerSuite.this)#LinkTextQuery

    Definition Classes
    WebBrowser
  68. def monthField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#MonthField

    Definition Classes
    WebBrowser
  69. def monthField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#MonthField

    Definition Classes
    WebBrowser
  70. def multiSel(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#MultiSel

    Definition Classes
    WebBrowser
  71. def multiSel(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#MultiSel

    Definition Classes
    WebBrowser
  72. def name(elementName: String): (OneBrowserPerSuite.this)#NameQuery

    Definition Classes
    WebBrowser
  73. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  74. final def notify(): Unit

    Definition Classes
    AnyRef
  75. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  76. def numberField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#NumberField

    Definition Classes
    WebBrowser
  77. def numberField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#NumberField

    Definition Classes
    WebBrowser
  78. def pageSource(implicit driver: WebDriver): String

    Definition Classes
    WebBrowser
  79. def pageTitle(implicit driver: WebDriver): String

    Definition Classes
    WebBrowser
  80. def partialLinkText(partialLinkText: String): (OneBrowserPerSuite.this)#PartialLinkTextQuery

    Definition Classes
    WebBrowser
  81. implicit val patienceConfig: (OneBrowserPerSuite.this)#PatienceConfig

    Definition Classes
    IntegrationPatience → AbstractPatienceConfiguration
  82. def pressKeys(value: String)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  83. def pwdField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#PasswordField

    Definition Classes
    WebBrowser
  84. def pwdField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#PasswordField

    Definition Classes
    WebBrowser
  85. def quit()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  86. def radioButton(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#RadioButton

    Definition Classes
    WebBrowser
  87. def radioButton(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#RadioButton

    Definition Classes
    WebBrowser
  88. def radioButtonGroup(groupName: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#RadioButtonGroup

    Definition Classes
    WebBrowser
  89. def rangeField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#RangeField

    Definition Classes
    WebBrowser
  90. def rangeField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#RangeField

    Definition Classes
    WebBrowser
  91. def reloadPage()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  92. def run(testName: Option[String], args: Args): Status

    Places the WebDriver provided by webDriver into the ConfigMap under the key org.scalatestplus.play.webDriver to make it available to nested suites; calls super.run; and lastly ensures the WebDriver is stopped after all tests and nested suites have completed.

    Places the WebDriver provided by webDriver into the ConfigMap under the key org.scalatestplus.play.webDriver to make it available to nested suites; calls super.run; and lastly ensures the WebDriver is stopped after all tests and nested suites have completed.

    testName

    an optional name of one test to run. If None, all relevant tests should be run. I.e., None acts like a wildcard that means run all relevant tests in this Suite.

    args

    the Args for this run

    returns

    a Status object that indicates when all tests and nested suites started by this method have completed, and whether or not a failure occurred.

    Definition Classes
    OneBrowserPerSuite → SuiteMixin
  93. final def scaled(span: Span): Span

    Definition Classes
    ScaledTimeSpans
  94. def searchField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#SearchField

    Definition Classes
    WebBrowser
  95. def searchField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#SearchField

    Definition Classes
    WebBrowser
  96. def setCaptureDir(targetDirPath: String): Unit

    Definition Classes
    WebBrowser
  97. def setScriptTimeout(timeout: Span)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  98. def singleSel(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#SingleSel

    Definition Classes
    WebBrowser
  99. def singleSel(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#SingleSel

    Definition Classes
    WebBrowser
  100. def spanScaleFactor: Double

    Definition Classes
    ScaledTimeSpans
  101. def submit()(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  102. def switchTo[T](target: (OneBrowserPerSuite.this)#SwitchTarget[T])(implicit driver: WebDriver): T

    Definition Classes
    WebBrowser
  103. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  104. def tagName(tagName: String): (OneBrowserPerSuite.this)#TagNameQuery

    Definition Classes
    WebBrowser
  105. def telField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TelField

    Definition Classes
    WebBrowser
  106. def telField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TelField

    Definition Classes
    WebBrowser
  107. def textArea(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TextArea

    Definition Classes
    WebBrowser
  108. def textArea(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TextArea

    Definition Classes
    WebBrowser
  109. def textField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TextField

    Definition Classes
    WebBrowser
  110. def textField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TextField

    Definition Classes
    WebBrowser
  111. def timeField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TimeField

    Definition Classes
    WebBrowser
  112. def timeField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#TimeField

    Definition Classes
    WebBrowser
  113. def timeout(value: Span): Timeout

    Definition Classes
    PatienceConfiguration
  114. def toString(): String

    Definition Classes
    AnyRef → Any
  115. def urlField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#UrlField

    Definition Classes
    WebBrowser
  116. def urlField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#UrlField

    Definition Classes
    WebBrowser
  117. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  118. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  119. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. implicit lazy val webDriver: WebDriver

    An implicit instance of WebDriver, created by calling createWebDriver.

    An implicit instance of WebDriver, created by calling createWebDriver. If there is an error when creating the WebDriver, UnavailableDriver will be assigned instead.

  121. def weekField(queryString: String)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#WeekField

    Definition Classes
    WebBrowser
  122. def weekField(query: (OneBrowserPerSuite.this)#Query)(implicit driver: WebDriver): (OneBrowserPerSuite.this)#WeekField

    Definition Classes
    WebBrowser
  123. def window(nameOrHandle: String): (OneBrowserPerSuite.this)#WindowTarget

    Definition Classes
    WebBrowser
  124. def windowHandle(implicit driver: WebDriver): String

    Definition Classes
    WebBrowser
  125. def windowHandles(implicit driver: WebDriver): Set[String]

    Definition Classes
    WebBrowser
  126. def withFixture(test: (OneBrowserPerSuite.this)#NoArgTest): Outcome

    Automatically cancels tests with an appropriate error message when the webDriver field is a UnavailableDriver, else calls super.withFixture(test)

    Automatically cancels tests with an appropriate error message when the webDriver field is a UnavailableDriver, else calls super.withFixture(test)

    Definition Classes
    OneBrowserPerSuite → SuiteMixin
  127. def withScreenshot(fun: ⇒ Unit)(implicit driver: WebDriver): Unit

    Definition Classes
    WebBrowser
  128. def xpath(xpath: String): (OneBrowserPerSuite.this)#XPathQuery

    Definition Classes
    WebBrowser

Inherited from BrowserFactory

Inherited from IntegrationPatience

Inherited from Eventually

Inherited from PatienceConfiguration

Inherited from AbstractPatienceConfiguration

Inherited from ScaledTimeSpans

Inherited from WebBrowser

Inherited from SuiteMixin

Inherited from AnyRef

Inherited from Any

Ungrouped