File tree 4 files changed +12
-3
lines changed
src/test/java/io/appium/java_client
4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,8 @@ test {
207
207
includeTestsMatching ' io.appium.java_client.drivers.options.*'
208
208
includeTestsMatching ' io.appium.java_client.events.*'
209
209
includeTestsMatching ' io.appium.java_client.internal.*'
210
+ includeTestsMatching ' io.appium.java_client.pagefactory_tests.DesktopBrowserCompatibilityTest'
211
+ includeTestsMatching ' io.appium.java_client.pagefactory_tests.TimeoutTest'
210
212
includeTestsMatching ' io.appium.java_client.proxy.*'
211
213
includeTestsMatching ' io.appium.java_client.remote.*'
212
214
includeTestsMatching ' io.appium.java_client.touch.*'
Original file line number Diff line number Diff line change 10
10
import java .net .DatagramSocket ;
11
11
import java .net .InetAddress ;
12
12
import java .net .SocketException ;
13
+ import java .net .URISyntaxException ;
13
14
import java .net .URL ;
14
15
import java .net .UnknownHostException ;
15
16
import java .nio .file .Files ;
@@ -35,7 +36,11 @@ public static Path resourcePathToLocalPath(String resourcePath) {
35
36
if (url == null ) {
36
37
throw new IllegalArgumentException (String .format ("Cannot find the '%s' resource" , resourcePath ));
37
38
}
38
- return Paths .get (url .getPath ());
39
+ try {
40
+ return Paths .get (url .toURI ());
41
+ } catch (URISyntaxException e ) {
42
+ throw new IllegalArgumentException (e );
43
+ }
39
44
}
40
45
41
46
public static String resourceAsString (String resourcePath ) {
Original file line number Diff line number Diff line change 26
26
import org .openqa .selenium .WebDriver ;
27
27
import org .openqa .selenium .WebElement ;
28
28
import org .openqa .selenium .chrome .ChromeDriver ;
29
+ import org .openqa .selenium .chrome .ChromeOptions ;
29
30
import org .openqa .selenium .support .FindBy ;
30
31
import org .openqa .selenium .support .FindBys ;
31
32
import org .openqa .selenium .support .PageFactory ;
@@ -58,7 +59,7 @@ public class DesktopBrowserCompatibilityTest {
58
59
}
59
60
60
61
@ Test public void chromeTest () {
61
- WebDriver driver = new ChromeDriver ();
62
+ WebDriver driver = new ChromeDriver (new ChromeOptions (). addArguments ( "--headless=new" ) );
62
63
try {
63
64
PageFactory .initElements (new AppiumFieldDecorator (driver , ofSeconds (15 )), this );
64
65
driver .get (helloAppiumHtml ().toUri ().toString ());
Original file line number Diff line number Diff line change 25
25
import org .openqa .selenium .WebDriver ;
26
26
import org .openqa .selenium .WebElement ;
27
27
import org .openqa .selenium .chrome .ChromeDriver ;
28
+ import org .openqa .selenium .chrome .ChromeOptions ;
28
29
import org .openqa .selenium .support .FindAll ;
29
30
import org .openqa .selenium .support .FindBy ;
30
31
@@ -86,7 +87,7 @@ public static void beforeAll() {
86
87
* The setting up.
87
88
*/
88
89
@ BeforeEach public void setUp () {
89
- driver = new ChromeDriver ();
90
+ driver = new ChromeDriver (new ChromeOptions (). addArguments ( "--headless=new" ) );
90
91
timeOutDuration = DEFAULT_WAITING_TIMEOUT ;
91
92
initElements (new AppiumFieldDecorator (driver , timeOutDuration ), this );
92
93
}
You can’t perform that action at this time.
0 commit comments