Skip to content

Commit d6cee9c

Browse files
committed
Adjusted for 3.3.0.0-RC1.
1 parent 4ed81e1 commit d6cee9c

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ If ScalaTest has saved you time, helped you ship better software, or become a ke
1414

1515
**Usage**
1616

17-
To use it for ScalaTest 3.2.19 and Selenium 4.21.x:
17+
To use it for ScalaTest 3.3.0-RC1 and Selenium 4.35.x:
1818

1919
SBT:
2020

2121
```
22-
libraryDependencies += "org.scalatestplus" %% "selenium-4-21" % "3.2.19.0" % "test"
22+
libraryDependencies += "org.scalatestplus" %% "selenium-4-35" % "3.3.0.0-RC1" % "test"
2323
```
2424

2525
Maven:
2626

2727
```
2828
<dependency>
2929
<groupId>org.scalatestplus</groupId>
30-
<artifactId>selenium-4-21_3</artifactId>
31-
<version>3.2.19.0</version>
30+
<artifactId>selenium-4-35_3</artifactId>
31+
<version>3.3.0.0-RC1</version>
3232
<scope>test</scope>
3333
</dependency>
3434
```
@@ -39,4 +39,5 @@ Please use the following commands to publish to Sonatype:
3939

4040
```
4141
$ sbt +publishSigned
42+
$ sbt sonaUpload
4243
```

build.sbt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import java.io.PrintWriter
22
import scala.io.Source
33

4-
name := "selenium-4.21"
4+
name := "selenium-4.35"
55

66
organization := "org.scalatestplus"
77

8-
version := "3.2.19.0"
8+
version := "3.3.0.0-RC1"
99

1010
homepage := Some(url("https://github.com/scalatest/scalatestplus-selenium"))
1111

@@ -26,17 +26,17 @@ developers := List(
2626
)
2727
)
2828

29-
scalaVersion := "2.13.13"
29+
scalaVersion := "2.13.16"
3030

31-
crossScalaVersions := List("2.11.12", "2.12.19", "2.13.13", "3.3.3")
31+
crossScalaVersions := List("2.11.12", "2.12.20", scalaVersion.value, "3.3.6")
3232

3333
libraryDependencies ++= Seq(
34-
"org.scalatest" %% "scalatest-core" % "3.2.19",
35-
"org.seleniumhq.selenium" % "selenium-java" % "4.21.0",
34+
"org.scalatest" %% "scalatest-core" % "3.3.0-RC1",
35+
"org.seleniumhq.selenium" % "selenium-java" % "4.35.0",
3636
"org.seleniumhq.selenium" % "htmlunit-driver" % "4.13.0",
3737
"org.eclipse.jetty" % "jetty-webapp" % "9.4.48.v20220622" % Test,
38-
"org.scalatest" %% "scalatest-funspec" % "3.2.19" % Test,
39-
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.19" % Test
38+
"org.scalatest" %% "scalatest-funspec" % "3.3.0-RC1" % Test,
39+
"org.scalatest" %% "scalatest-shouldmatchers" % "3.3.0-RC1" % Test
4040
)
4141

4242
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
@@ -83,10 +83,7 @@ OsgiKeys.additionalHeaders:= Map(
8383
"Bundle-Vendor" -> "Artima, Inc."
8484
)
8585

86-
publishTo := {
87-
val nexus = "https://oss.sonatype.org/"
88-
Some("publish-releases" at nexus + "service/local/staging/deploy/maven2")
89-
}
86+
publishTo := localStaging.value
9087

9188
publishMavenStyle := true
9289

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.8
1+
sbt.version=1.11.4

src/main/scala-2/org/scalatestplus/selenium/WebBrowser.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,29 @@ import org.openqa.selenium.htmlunit.HtmlUnitDriver
2424
import org.openqa.selenium.edge.EdgeDriver
2525
import org.openqa.selenium.By
2626
import org.openqa.selenium.WebElement
27-
import java.util.concurrent.TimeUnit
2827

28+
import java.util.concurrent.TimeUnit
2929
import scala.collection.JavaConverters._
3030
import org.openqa.selenium.Cookie
31-
import java.util.Date
3231

32+
import java.util.Date
3333
import org.scalatest.time.Span
3434
import org.openqa.selenium.TakesScreenshot
3535
import org.openqa.selenium.OutputType
36+
3637
import java.io.File
3738
import java.io.FileOutputStream
3839
import java.io.FileInputStream
39-
4040
import org.openqa.selenium.Alert
4141
import org.openqa.selenium.support.ui.Select
4242
import org.scalatest.exceptions.TestFailedException
4343
import org.scalatest.exceptions.StackDepthException
4444
import org.openqa.selenium.JavascriptExecutor
4545
import org.scalactic.source
4646
import org.openqa.selenium.firefox.FirefoxOptions
47+
4748
import java.io.Closeable
49+
import java.time.Duration
4850

4951
/**
5052
* Trait that provides a domain specific language (DSL) for writing browser-based tests using <a href="http://seleniumhq.org">Selenium</a>.
@@ -4015,7 +4017,7 @@ trait WebBrowser {
40154017
* @param driver the <code>WebDriver</code> on which to set the implicit wait
40164018
*/
40174019
def implicitlyWait(timeout: Span)(implicit driver: WebDriver): Unit = {
4018-
driver.manage.timeouts.implicitlyWait(timeout.totalNanos, TimeUnit.NANOSECONDS)
4020+
driver.manage.timeouts.implicitlyWait(Duration.ofNanos(timeout.totalNanos))
40194021
}
40204022

40214023
/**
@@ -4599,7 +4601,7 @@ trait WebBrowser {
45994601
* @param timeout the amount of time to wait for an asynchronous script to finish execution before throwing exception
46004602
*/
46014603
def setScriptTimeout(timeout: Span)(implicit driver: WebDriver): Unit = {
4602-
driver.manage().timeouts().setScriptTimeout(timeout.totalNanos, TimeUnit.NANOSECONDS);
4604+
driver.manage().timeouts().scriptTimeout(Duration.ofNanos(timeout.totalNanos));
46034605
}
46044606

46054607
// Clears the text field or area, then presses the passed keys
@@ -4860,7 +4862,7 @@ object InternetExplorer extends InternetExplorer
48604862
*/
48614863
trait Edge extends WebBrowser with Driver with ScreenshotCapturer {
48624864
/**
4863-
* <code>WebBrowser</code> subtrait that defines an implicit <code>WebDriver</code> for Safari (an <code>org.openqa.selenium.safari.SafariDriver</code>).
4865+
* <code>WebBrowser</code> subtrait that defines an implicit <code>WebDriver</code> for Microsoft Edge (an <code>org.openqa.selenium.edge.EdgeDriver</code>).
48644866
*/
48654867
implicit val webDriver = new EdgeDriver()
48664868

0 commit comments

Comments
 (0)