mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added Locations E2E tests
This commit is contained in:
@@ -69,7 +69,7 @@ public static class AppHelper
|
||||
public static bool TryRetryFindSuccessToast(ChromeDriver driver)
|
||||
{
|
||||
int retryCounter = 0;
|
||||
retry:
|
||||
retry:
|
||||
try
|
||||
{
|
||||
|
||||
@@ -101,4 +101,24 @@ public static class AppHelper
|
||||
{
|
||||
return webElement.GetAttribute("checked") == "true";
|
||||
}
|
||||
|
||||
public static void ScrollIntoViewAndClick(ChromeDriver driver, IWebElement webElement)
|
||||
{
|
||||
driver.ExecuteScript("arguments[0].scrollIntoView();", webElement);
|
||||
int retryCounter = 0;
|
||||
retry:
|
||||
try
|
||||
{
|
||||
Thread.Sleep(250);
|
||||
webElement.Click();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
if (retryCounter++ < 20)
|
||||
{
|
||||
goto retry;
|
||||
}
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user