Skip to content

Commit fc68315

Browse files
jongyoulclaude
andcommitted
[ZEPPELIN-6409] Use JavaScript click for Angular-rendered ng-click element
clickAndWait() times out because Selenium considers the Angular-compiled ng-click div as not clickable (overlay/stale element during Angular digest). Switch to visibilityWait + executeScript("arguments[0].click()") which bypasses Selenium's clickability check and directly triggers the DOM click. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 80bb39f commit fc68315

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • zeppelin-integration/src/test/java/org/apache/zeppelin/integration

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.openqa.selenium.Keys;
3838
import org.openqa.selenium.StaleElementReferenceException;
3939
import org.openqa.selenium.TimeoutException;
40+
import org.openqa.selenium.JavascriptExecutor;
4041
import org.openqa.selenium.WebElement;
4142
import org.slf4j.Logger;
4243
import org.slf4j.LoggerFactory;
@@ -336,10 +337,13 @@ void testAngularRunParagraph() throws Exception {
336337
// Set new text value for 2nd paragraph
337338
setTextOfParagraph(2, "%sh echo NEW_VALUE");
338339

339-
// Click on 1 paragraph to trigger z.runParagraph() function
340-
340+
// Click on Angular-rendered div to trigger z.runParagraph() function.
341+
// Use JavaScript click because Angular-compiled ng-click elements may not be
342+
// considered "clickable" by Selenium's native click (overlay/stale issues).
343+
WebElement angularDiv = visibilityWait(By.xpath(
344+
getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"), MAX_BROWSER_TIMEOUT_SEC);
345+
((JavascriptExecutor) manager.getWebDriver()).executeScript("arguments[0].click();", angularDiv);
341346
ZeppelinITUtils.sleep(1000, false);
342-
clickAndWait(By.xpath(getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"));
343347

344348
waitForParagraph(2, "FINISHED");
345349

0 commit comments

Comments
 (0)