Skip to content

Commit

Permalink
#143: Stabilize the SelenideAddonsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Pfotenhauer committed Sep 25, 2020
1 parent 2e24878 commit 4c9c357
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/com/xceptance/neodymium/util/SelenideAddonsTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.xceptance.neodymium.util;

import static com.codeborne.selenide.Condition.exist;
import static com.codeborne.selenide.Condition.hidden;
import static com.codeborne.selenide.Condition.visible;
import static com.codeborne.selenide.Selenide.$;

Expand All @@ -18,6 +19,7 @@
import com.codeborne.selenide.Condition;
import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.SelenideElement;
import com.codeborne.selenide.ex.ElementNotFound;
import com.codeborne.selenide.ex.ElementShould;
import com.codeborne.selenide.ex.UIAssertionError;
import com.codeborne.selenide.logevents.LogEvent;
Expand Down Expand Up @@ -524,6 +526,22 @@ public void testUpwardDragAndDrop()
private void openSliderPage()
{
Selenide.open("https://demos.telerik.com/kendo-ui/slider/index");
boolean overlayIsVisible = true;
try
{
$("#onetrust-accept-btn-handler").shouldBe(visible);
}
catch (ElementNotFound e)
{
overlayIsVisible = false;
}

if (overlayIsVisible)
{
$("#onetrust-accept-btn-handler").click();
$("#onetrust-consent-sdk .onetrust-pc-dark-filter").waitUntil(hidden, Neodymium.configuration().selenideTimeout());
Selenide.refresh();
}
}

private void leftHorizontalDragAndDropUntilAttribute(SelenideElement elementToMove, SelenideElement elementToCheck, int horizontalMovement,
Expand Down

0 comments on commit 4c9c357

Please sign in to comment.