mirror of
https://github.com/apache/archiva.git
synced 2025-02-22 01:44:47 +00:00
Trying another fix for a chrome error
This commit is contained in:
parent
0643a0fb3f
commit
5aab7ac1b9
@ -623,6 +623,7 @@ public void clickButtonWithLocator( String locator, boolean wait )
|
|||||||
|
|
||||||
public <V> V tryClick(By clickableLocator, Function<? super WebDriver, V> conditions, String message, int attempts, int maxWaitTimeInS) {
|
public <V> V tryClick(By clickableLocator, Function<? super WebDriver, V> conditions, String message, int attempts, int maxWaitTimeInS) {
|
||||||
|
|
||||||
|
getWebDriver().manage().window().maximize();
|
||||||
int count = attempts;
|
int count = attempts;
|
||||||
WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
|
WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
|
||||||
V result = null;
|
V result = null;
|
||||||
@ -634,9 +635,7 @@ public <V> V tryClick(By clickableLocator, Function<? super WebDriver, V> condit
|
|||||||
{
|
{
|
||||||
el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator ));
|
el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator ));
|
||||||
Actions actions = new Actions(getWebDriver());
|
Actions actions = new Actions(getWebDriver());
|
||||||
actions.moveToElement(el);
|
actions.moveToElement(el).click().perform();
|
||||||
actions.perform();
|
|
||||||
el.click();
|
|
||||||
result = wait.until( conditions );
|
result = wait.until( conditions );
|
||||||
return result;
|
return result;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user