Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Selenium How To Wait Page Loading

I am trying to create an application using Selenium. My functions are exactly as follows. After making selections from some dropdown menus, an animation with the class 'loading' appears on the page, during which all elements are removed…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I am trying to create an application using Selenium. My functions are exactly as follows. After making selections from some dropdown menus, an animation with the class 'loading' appears on the page, during which all elements are removed and then re-added once the loading is complete. I managed to handle this the way I shared, but I believe there is a more efficient way to do it. Could you please help me?



selectElement: The menu created using ul and li has JavaScript events defined.



optionElement: After making a selection in the selectElement part, the options within the select are loaded, and I check whether they have been loaded.



optionToSelect: Consists of the li elements within the selectElement.



isLoadingExpected: After making some selections, a loading animation appears on the page, which I haven't been able to prevent.



Here's the video and what I want to do(Blurred for privacy): https://streamable.com/p47d93



selectItem(Elements.xxx.xPath, Elements.xxxOptions.xPath, aaa.bbb.xPath, 0);



`public static void selectItem(String selectElement, String optionElements, String optionToSelect, int isLoadingExpected) throws Exception {

WebDriverWait waitElement = new WebDriverWait(chromeDriver, Duration.ofSeconds(10));




    if (isLoadingExpected == 1) {
waitElement.until(ExpectedConditions.visibilityOfElementLocated(By.className("loading")));
waitElement.until(ExpectedConditions.invisibilityOfElementLocated(By.className("loading")));
}

WebElement selectWebElement = waitElement.until(ExpectedConditions.elementToBeClickable(By.xpath(selectElement)));
waitElement.until(ExpectedConditions.numberOfElementsToBeMoreThan(By.xpath(optionElements), 1));
selectWebElement.click();

WebElement optionWebElement = waitElement.until(ExpectedConditions.elementToBeClickable(By.xpath(optionToSelect)));
optionWebElement.click();
}`


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Selenium How To Wait Page Loading

Thematisch verwandte Begriffe: Selenium, Wait, Page, Loading · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-49449 | Joplin is an open source note-taking and to-do application that organise…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick