Skip to content

Commit 0fa52a7

Browse files
committed
[ZEPPELIN-6398] Fix Selenium-based integration tests
### What is this PR for? Selenium-based integration tests have been failing recently. There were several issues: - The Chrome/Edge driver had a bug related to calling window.maximize(). Since a fixed window size is sufficient for our tests, I replaced it with a method that sets a fixed window size instead. - The element wait logic was not properly separated by intent, which caused unintended test failures. I refactored the wait methods to distinguish between presence, visibility, and clickability. - Browser built-in features such as the password manager could trigger alert dialogs that block test execution, so these have been disabled. Previously, we switched to EdgeDriver (also Chromium-based) to work around the window.maximize() bug, but the same issue occurred. Therefore, I reverted back to ChromeDriver. ### What type of PR is it? Bug Fix ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-6398 ### How should this be tested? - Check `test-selenium-with-spark-module-for-spark-3-5` job ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #5160 from tbonelee/fix-selenium-edge. Signed-off-by: ChanHo Lee <chanholee@apache.org> (cherry picked from commit 776e29c) Signed-off-by: ChanHo Lee <chanholee@apache.org>
1 parent 5196cbf commit 0fa52a7

7 files changed

Lines changed: 77 additions & 84 deletions

File tree

.github/workflows/frontend.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -149,29 +149,11 @@ jobs:
149149
defaults:
150150
run:
151151
shell: bash -l {0}
152-
env:
153-
ZEPPELIN_SELENIUM_BROWSER: "edge"
154152
steps:
155153
- name: Checkout
156154
uses: actions/checkout@v4
157155
- name: Tune Runner VM
158156
uses: ./.github/actions/tune-runner-vm
159-
- name: Install Microsoft Edge
160-
run: |
161-
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-edge.gpg
162-
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main" | sudo tee /etc/apt/sources.list.d/microsoft-edge.list
163-
sudo apt-get update
164-
sudo apt-get install -y microsoft-edge-stable
165-
- name: Install msedgedriver
166-
run: |
167-
EDGE_VERSION=$(microsoft-edge --version | awk '{print $3}')
168-
wget -q "https://msedgedriver.microsoft.com/${EDGE_VERSION}/edgedriver_linux64.zip" -O edgedriver.zip
169-
unzip -q edgedriver.zip
170-
sudo mv msedgedriver /usr/local/bin/
171-
sudo chmod +x /usr/local/bin/msedgedriver
172-
rm edgedriver.zip
173-
- name: Print Edge version
174-
run: msedgedriver --version
175157
- name: Set up JDK 11
176158
uses: actions/setup-java@v4
177159
with:

zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
package org.apache.zeppelin;
1919

2020

21-
import com.google.common.base.Function;
2221
import java.io.File;
2322
import java.net.URI;
2423
import java.net.URISyntaxException;
2524
import java.time.Duration;
26-
import java.time.temporal.ChronoUnit;
2725
import org.apache.commons.codec.binary.Base64;
2826
import org.apache.commons.io.FileUtils;
2927
import org.openqa.selenium.By;
@@ -38,8 +36,6 @@
3836
import org.openqa.selenium.WebElement;
3937
import org.openqa.selenium.interactions.Actions;
4038
import org.openqa.selenium.support.ui.ExpectedConditions;
41-
import org.openqa.selenium.support.ui.FluentWait;
42-
import org.openqa.selenium.support.ui.Wait;
4339
import org.openqa.selenium.support.ui.WebDriverWait;
4440
import org.slf4j.Logger;
4541
import org.slf4j.LoggerFactory;
@@ -55,15 +51,13 @@ abstract public class AbstractZeppelinIT {
5551
protected static final long MAX_PARAGRAPH_TIMEOUT_SEC = 120;
5652

5753
protected void authenticationUser(String userName, String password) {
58-
pollingWait(
54+
clickableWait(
5955
By.xpath("//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
6056
MAX_BROWSER_TIMEOUT_SEC).click();
6157

62-
ZeppelinITUtils.sleep(1000, false);
63-
64-
pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
65-
pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
66-
pollingWait(
58+
visibilityWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
59+
visibilityWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
60+
clickableWait(
6761
By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
6862
MAX_BROWSER_TIMEOUT_SEC).click();
6963

@@ -132,7 +126,7 @@ protected static String getNoteFormsXPath() {
132126
protected boolean waitForParagraph(final int paragraphNo, final String state) {
133127
By locator = By.xpath(getParagraphXPath(paragraphNo)
134128
+ "//div[contains(@class, 'control')]//span[2][contains(.,'" + state + "')]");
135-
WebElement element = pollingWait(locator, MAX_PARAGRAPH_TIMEOUT_SEC);
129+
WebElement element = visibilityWait(locator, MAX_PARAGRAPH_TIMEOUT_SEC);
136130
return element.isDisplayed();
137131
}
138132

@@ -145,20 +139,29 @@ protected String getParagraphStatus(final int paragraphNo) {
145139

146140
protected boolean waitForText(final String txt, final By locator) {
147141
try {
148-
WebElement element = pollingWait(locator, MAX_BROWSER_TIMEOUT_SEC);
142+
WebElement element = visibilityWait(locator, MAX_BROWSER_TIMEOUT_SEC);
149143
return txt.equals(element.getText());
150144
} catch (TimeoutException e) {
151145
return false;
152146
}
153147
}
154148

155149
protected WebElement pollingWait(final By locator, final long timeWait) {
156-
Wait<WebDriver> wait = new FluentWait<>(manager.getWebDriver())
157-
.withTimeout(Duration.of(timeWait, ChronoUnit.SECONDS))
158-
.pollingEvery(Duration.of(1, ChronoUnit.SECONDS))
159-
.ignoring(NoSuchElementException.class);
150+
WebDriverWait wait = new WebDriverWait(manager.getWebDriver(),
151+
Duration.ofSeconds(timeWait));
152+
return wait.until(ExpectedConditions.presenceOfElementLocated(locator));
153+
}
154+
155+
protected WebElement visibilityWait(final By locator, final long timeWait) {
156+
WebDriverWait wait = new WebDriverWait(manager.getWebDriver(),
157+
Duration.ofSeconds(timeWait));
158+
return wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
159+
}
160160

161-
return wait.until((Function<WebDriver, WebElement>) driver -> driver.findElement(locator));
161+
protected WebElement clickableWait(final By locator, final long timeWait) {
162+
WebDriverWait wait = new WebDriverWait(manager.getWebDriver(),
163+
Duration.ofSeconds(timeWait));
164+
return wait.until(ExpectedConditions.elementToBeClickable(locator));
162165
}
163166

164167
protected void createNewNote() {
@@ -193,7 +196,7 @@ protected void deleteTrashNotebook(final WebDriver driver) {
193196
}
194197

195198
protected void clickAndWait(final By locator) {
196-
WebElement element = pollingWait(locator, MAX_IMPLICIT_WAIT);
199+
WebElement element = clickableWait(locator, MAX_IMPLICIT_WAIT);
197200
try {
198201
element.click();
199202
ZeppelinITUtils.sleep(1000, false);

zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import org.apache.commons.lang3.SystemUtils;
3232
import org.openqa.selenium.By;
33+
import org.openqa.selenium.Dimension;
3334
import org.openqa.selenium.TimeoutException;
3435
import org.openqa.selenium.WebDriver;
3536
import org.openqa.selenium.chrome.ChromeDriver;
@@ -84,6 +85,12 @@ private WebDriver constructWebDriver(int port) {
8485
Supplier<WebDriver> chromeDriverSupplier = () -> {
8586
try {
8687
ChromeOptions options = new ChromeOptions();
88+
options.addArguments("--disable-search-engine-choice-screen");
89+
options.setExperimentalOption("prefs", Map.of(
90+
"credentials_enable_service", false,
91+
"profile.password_manager_enabled", false,
92+
"profile.password_manager_leak_detection", false
93+
));
8794
return new ChromeDriver(options);
8895
} catch (Exception e) {
8996
LOG.error("Exception in WebDriverManager while ChromeDriver ", e);
@@ -169,7 +176,8 @@ public Boolean apply(WebDriver d) {
169176
assertTrue(loaded);
170177

171178
try {
172-
driver.manage().window().maximize();
179+
// Manually setting fixed window size since `maximize()` crashes for Chrome/Edge driver on linux with xvfb.
180+
driver.manage().window().setSize(new Dimension(1920, 1080));
173181
} catch (Exception e) {
174182
LOG.warn("Failed to maximize browser window. Consider using setSize() instead.", e);
175183
}

zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,37 +109,37 @@ void testAnyOfRolesUser() throws Exception {
109109
try {
110110
authenticationUser("admin", "password1");
111111

112-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
112+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
113113
MAX_BROWSER_TIMEOUT_SEC).click();
114114
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
115115

116-
assertTrue(pollingWait(By.xpath(
116+
assertTrue(visibilityWait(By.xpath(
117117
"//div[@id='main']/div/div[2]"),
118118
MIN_IMPLICIT_WAIT).isDisplayed(), "Check is user has permission to view this page");
119119

120120
logoutUser("admin");
121121

122122
authenticationUser("finance1", "finance1");
123123

124-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
124+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
125125
MAX_BROWSER_TIMEOUT_SEC).click();
126126
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
127127

128128
assertTrue(
129-
pollingWait(By.xpath("//div[@id='main']/div/div[2]"), MIN_IMPLICIT_WAIT).isDisplayed(),
129+
visibilityWait(By.xpath("//div[@id='main']/div/div[2]"), MIN_IMPLICIT_WAIT).isDisplayed(),
130130
"Check is user has permission to view this page");
131131

132132
logoutUser("finance1");
133133

134134
authenticationUser("hr1", "hr1");
135135

136-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
136+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
137137
MAX_BROWSER_TIMEOUT_SEC).click();
138138
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
139139

140140
try {
141141
assertTrue(
142-
pollingWait(By.xpath("//li[contains(@class, 'ng-toast__message')]//span/span"),
142+
visibilityWait(By.xpath("//li[contains(@class, 'ng-toast__message')]//span/span"),
143143
MIN_IMPLICIT_WAIT).isDisplayed(),
144144
"Check is user has permission to view this page");
145145
} catch (TimeoutException e) {
@@ -161,27 +161,27 @@ void testGroupPermission() throws Exception {
161161
String noteId = manager.getWebDriver().getCurrentUrl()
162162
.substring(manager.getWebDriver().getCurrentUrl().lastIndexOf("/") + 1);
163163

164-
pollingWait(By.xpath("//span[@uib-tooltip='Note permissions']"),
164+
clickableWait(By.xpath("//span[@uib-tooltip='Note permissions']"),
165165
MAX_BROWSER_TIMEOUT_SEC).click();
166-
pollingWait(By.xpath(".//*[@id='selectOwners']/following::span//input"),
166+
visibilityWait(By.xpath(".//*[@id='selectOwners']/following::span//input"),
167167
MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
168-
pollingWait(By.xpath(".//*[@id='selectReaders']/following::span//input"),
168+
visibilityWait(By.xpath(".//*[@id='selectReaders']/following::span//input"),
169169
MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
170-
pollingWait(By.xpath(".//*[@id='selectRunners']/following::span//input"),
170+
visibilityWait(By.xpath(".//*[@id='selectRunners']/following::span//input"),
171171
MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
172-
pollingWait(By.xpath(".//*[@id='selectWriters']/following::span//input"),
172+
visibilityWait(By.xpath(".//*[@id='selectWriters']/following::span//input"),
173173
MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
174-
pollingWait(By.xpath("//button[@ng-click='savePermissions()']"), MAX_BROWSER_TIMEOUT_SEC)
174+
visibilityWait(By.xpath("//button[@ng-click='savePermissions()']"), MAX_BROWSER_TIMEOUT_SEC)
175175
.sendKeys(Keys.ENTER);
176176

177-
pollingWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Permissions Saved ')]" +
177+
clickableWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Permissions Saved ')]" +
178178
"//div[@class='modal-footer']//button[contains(.,'OK')]"),
179179
MAX_BROWSER_TIMEOUT_SEC).click();
180180
logoutUser("finance1");
181181

182182
authenticationUser("hr1", "hr1");
183183
try {
184-
WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
184+
WebElement element = visibilityWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
185185
MAX_BROWSER_TIMEOUT_SEC);
186186
assertFalse(element.isDisplayed(), "Check is user has permission to view this note link");
187187
} catch (Exception e) {
@@ -202,7 +202,7 @@ void testGroupPermission() throws Exception {
202202

203203
authenticationUser("finance2", "finance2");
204204
try {
205-
WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
205+
WebElement element = visibilityWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
206206
MAX_BROWSER_TIMEOUT_SEC);
207207
assertTrue(element.isDisplayed(), "Check is user has permission to view this note link");
208208
} catch (Exception e) {

zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ void testGloballyAction() throws Exception {
111111
try {
112112
//step 1: (admin) login, set 'globally in shared' mode of python interpreter, logout
113113
authenticationUser("admin", "password1");
114-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
114+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
115115
MAX_BROWSER_TIMEOUT_SEC).click();
116116
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
117-
pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
117+
visibilityWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
118118
MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
119119
ZeppelinITUtils.sleep(500, false);
120120
clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
@@ -206,7 +206,7 @@ void testGloballyAction() throws Exception {
206206
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
207207
.until(ExpectedConditions.visibilityOfElementLocated(locator));
208208
if (element.isDisplayed()) {
209-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
209+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
210210
MAX_BROWSER_TIMEOUT_SEC).click();
211211
}
212212
waitForParagraph(2, "FINISHED");
@@ -265,11 +265,11 @@ void testPerUserScopedAction() throws Exception {
265265
try {
266266
//step 1: (admin) login, set 'Per user in scoped' mode of python interpreter, logout
267267
authenticationUser("admin", "password1");
268-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
268+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
269269
MAX_BROWSER_TIMEOUT_SEC).click();
270270

271271
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
272-
pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
272+
visibilityWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
273273
MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
274274
ZeppelinITUtils.sleep(500, false);
275275

@@ -370,7 +370,7 @@ void testPerUserScopedAction() throws Exception {
370370
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
371371
.until(ExpectedConditions.visibilityOfElementLocated(locator));
372372
if (element.isDisplayed()) {
373-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
373+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
374374
MAX_BROWSER_TIMEOUT_SEC).click();
375375
}
376376
runParagraph(2);
@@ -467,7 +467,7 @@ void testPerUserScopedAction() throws Exception {
467467
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
468468
.until(ExpectedConditions.visibilityOfElementLocated(locator));
469469
if (element.isDisplayed()) {
470-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
470+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
471471
MAX_BROWSER_TIMEOUT_SEC).click();
472472
}
473473
waitForParagraph(1, "FINISHED");
@@ -486,7 +486,7 @@ void testPerUserScopedAction() throws Exception {
486486
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
487487
.until(ExpectedConditions.visibilityOfElementLocated(locator));
488488
if (element.isDisplayed()) {
489-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
489+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
490490
MAX_BROWSER_TIMEOUT_SEC).click();
491491
}
492492
runParagraph(1);
@@ -510,11 +510,11 @@ void testPerUserScopedAction() throws Exception {
510510
//System: Check if the number of python interpreter process is 0
511511
//System: Check if the number of python process is 0
512512
authenticationUser("admin", "password1");
513-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
513+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
514514
MAX_BROWSER_TIMEOUT_SEC).click();
515515

516516
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
517-
pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
517+
visibilityWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
518518
MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
519519
ZeppelinITUtils.sleep(500, false);
520520

@@ -553,10 +553,10 @@ void testPerUserIsolatedAction() throws Exception {
553553
try {
554554
//step 1: (admin) login, set 'Per user in isolated' mode of python interpreter, logout
555555
authenticationUser("admin", "password1");
556-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
556+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
557557
MAX_BROWSER_TIMEOUT_SEC).click();
558558
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
559-
pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
559+
visibilityWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
560560
MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
561561
ZeppelinITUtils.sleep(500, false);
562562
clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
@@ -653,7 +653,7 @@ void testPerUserIsolatedAction() throws Exception {
653653
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
654654
.until(ExpectedConditions.visibilityOfElementLocated(locator));
655655
if (element.isDisplayed()) {
656-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
656+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
657657
MAX_BROWSER_TIMEOUT_SEC).click();
658658
}
659659
runParagraph(2);
@@ -752,7 +752,7 @@ void testPerUserIsolatedAction() throws Exception {
752752
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
753753
.until(ExpectedConditions.visibilityOfElementLocated(locator));
754754
if (element.isDisplayed()) {
755-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
755+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
756756
MAX_BROWSER_TIMEOUT_SEC).click();
757757
}
758758
waitForParagraph(1, "FINISHED");
@@ -771,7 +771,7 @@ void testPerUserIsolatedAction() throws Exception {
771771
(new WebDriverWait(manager.getWebDriver(), Duration.ofSeconds(MAX_BROWSER_TIMEOUT_SEC)))
772772
.until(ExpectedConditions.visibilityOfElementLocated(locator));
773773
if (element.isDisplayed()) {
774-
pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
774+
clickableWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
775775
MAX_BROWSER_TIMEOUT_SEC).click();
776776
}
777777
runParagraph(1);
@@ -795,11 +795,11 @@ void testPerUserIsolatedAction() throws Exception {
795795
//System: Check if the number of python interpreter process is 0
796796
//System: Check if the number of python process is 0
797797
authenticationUser("admin", "password1");
798-
pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
798+
clickableWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
799799
MAX_BROWSER_TIMEOUT_SEC).click();
800800

801801
clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
802-
pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
802+
visibilityWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
803803
MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
804804
ZeppelinITUtils.sleep(500, false);
805805

0 commit comments

Comments
 (0)