Skip to content

Commit 482daaa

Browse files
committed
fix: change the browser matcher for a more generic one. Some basic improvements
1 parent c6d3051 commit 482daaa

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

executeTests

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ help()
4444
echo -e ""
4545
echo -e "\t\t\$APPIUM_URL (optional): Appium server URL. if Appium Server is not specified, will be used \"localhost:4723/wd/hub\""
4646
echo -e ""
47-
echo -e "\t\t\$BACKEND (optional): oCIS or oC10. If not specified, will be used oCIS"
48-
echo -e ""
47+
echo -e "\t\t\$BACKEND (optional): oCIS or oC10. If not specified, will be used oCIS"
48+
echo -e ""
4949
echo -e "The option -h: will show this help"
5050
echo -e ""
5151
echo -e ""

src/main/java/android/FileListPage.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ public class FileListPage extends CommonPage {
9393
@AndroidFindBy(id = "com.owncloud.android:id/dialog_file_already_exists_title")
9494
WebElement conflictTitle;
9595

96+
@AndroidFindBy(id = "android:id/chooser_header")
97+
List<WebElement> chooserHeader;
98+
9699
public static FileListPage instance;
97100

98101
private FileListPage() {
@@ -343,9 +346,10 @@ public boolean isItemOpened(String itemType, String itemName) {
343346
if (itemType.equals("file")) {
344347
Log.log(Level.FINE, "Opening file");
345348
//Waiting till file is opened and the dialog shown
346-
waitById(WAIT_TIME, "android:id/chooser_header");
347-
//To dismiss the dialog
348-
tap(200,300);
349+
if (!chooserHeader.isEmpty()) {
350+
//To dismiss the dialog if the specific version shows the chooser header
351+
tap(200, 300);
352+
}
349353
boolean fileNameVisible = findUIAutomatorText(itemName).isDisplayed();
350354
boolean fileTypeIconVisible = findId("com.owncloud.android:id/fdImageDetailFile").isDisplayed();
351355
return fileNameVisible && fileTypeIconVisible;

src/main/java/android/ShortcutDialogPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class ShortcutDialogPage extends CommonPage {
2323
@AndroidFindBy(id = "android:id/button1")
2424
private WebElement openShortcut;
2525

26-
@AndroidFindBy(id = "com.android.chrome:id/fre_main_layout")
26+
@AndroidFindBy(id = "com.android.chrome:id/title")
2727
private WebElement browser;
2828

2929
public static ShortcutDialogPage instance;

src/test/java/io/cucumber/DocumentProviderSteps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import io.cucumber.java.en.Given;
66
import io.cucumber.java.en.When;
7-
import utils.log.Log;
87
import utils.log.StepLogger;
98

109
public class DocumentProviderSteps {

src/test/java/io/cucumber/LoginSteps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import io.cucumber.java.en.Given;
1212
import utils.LocProperties;
13-
import utils.log.Log;
1413
import utils.log.StepLogger;
1514

1615
public class LoginSteps {

src/test/java/io/cucumber/UploadSteps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.util.logging.Level;
44

55
import io.cucumber.java.en.Then;
6-
import utils.log.Log;
76
import utils.log.StepLogger;
87

98
public class UploadSteps {

0 commit comments

Comments
 (0)