Skip to content

Commit c2b45a6

Browse files
committed
Corrected DriverSpec.scala to use InternetExplorer and Safari in their own test correctly.
1 parent 1ad1956 commit c2b45a6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/test/scala/org/scalatestplus/selenium/DriverSpec.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ package org.scalatestplus.selenium
22

33
import org.scalatest._
44
import SharedHelpers.EventRecordingReporter
5-
import org.openqa.selenium.firefox.{FirefoxDriver, FirefoxOptions}
6-
import org.openqa.selenium.chrome.ChromeDriver
7-
import org.openqa.selenium.ie.InternetExplorerDriver
85
import org.scalatest.tagobjects.Slow
96

107
class DriverSpec extends funspec.AnyFunSpec {
@@ -34,6 +31,8 @@ class DriverSpec extends funspec.AnyFunSpec {
3431

3532
class GoogleSearchSpecWithChrome extends GoogleSearchSpec with Chrome
3633
class GoogleSearchSpecWithFirefox extends GoogleSearchSpec with Firefox
34+
class GoogleSearchSpecWithInternetExplorer extends GoogleSearchSpec with InternetExplorer
35+
class GoogleSearchSpecWithSafari extends GoogleSearchSpec with Safari
3736
class GoogleSearchSpecWithEdge extends GoogleSearchSpec with Edge
3837

3938
it("should work with Chrome", Slow) {
@@ -76,7 +75,7 @@ class DriverSpec extends funspec.AnyFunSpec {
7675

7776
it("should work with Internet Explorer", Slow) {
7877
// Cancel when Internet Explorer is not available
79-
val s = try new GoogleSearchSpecWithFirefox catch { case e: Throwable => cancel(e) }
78+
val s = try new GoogleSearchSpecWithInternetExplorer catch { case e: Throwable => cancel(e) }
8079
val rep = new EventRecordingReporter
8180
s.run(None, Args(reporter = rep))
8281
val scopeOpenedList = rep.scopeOpenedEventsReceived
@@ -95,7 +94,7 @@ class DriverSpec extends funspec.AnyFunSpec {
9594

9695
it("should work with Safari", Slow) {
9796
// Cancel when Safari is not available
98-
val s = try new GoogleSearchSpecWithFirefox catch { case e: Throwable => cancel(e) }
97+
val s = try new GoogleSearchSpecWithSafari catch { case e: Throwable => cancel(e) }
9998
val rep = new EventRecordingReporter
10099
s.run(None, Args(reporter = rep))
101100
val scopeOpenedList = rep.scopeOpenedEventsReceived

0 commit comments

Comments
 (0)