[E2E] [CI] Fix flaky e2e test (#11077)
* fix flaky e2e test * fix flaky e2e test * fix flaky e2e test
This commit is contained in:
parent
25ded1e81b
commit
72d29971bf
|
|
@ -17,6 +17,7 @@
|
|||
* under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.e2e.pages.common;
|
||||
|
||||
import org.apache.dolphinscheduler.e2e.pages.datasource.DataSourcePage;
|
||||
|
|
@ -28,7 +29,6 @@ import org.openqa.selenium.JavascriptExecutor;
|
|||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.remote.RemoteWebDriver;
|
||||
import org.openqa.selenium.support.FindBy;
|
||||
import org.openqa.selenium.support.FindBys;
|
||||
import org.openqa.selenium.support.PageFactory;
|
||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
|
@ -75,7 +75,7 @@ public class NavBarPage {
|
|||
|
||||
if (nav == ResourcePage.class) {
|
||||
new WebDriverWait(driver, 60).until(ExpectedConditions.elementToBeClickable(resourceTab));
|
||||
resourceTab.click();
|
||||
((JavascriptExecutor) driver).executeScript("arguments[0].click();", resourceTab());
|
||||
return nav.cast(new ResourcePage(driver));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,13 @@ import java.util.List;
|
|||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.JavascriptExecutor;
|
||||
import org.openqa.selenium.Keys;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.remote.RemoteWebDriver;
|
||||
import org.openqa.selenium.support.FindBy;
|
||||
import org.openqa.selenium.support.FindBys;
|
||||
import org.openqa.selenium.support.PageFactory;
|
||||
import org.openqa.selenium.support.ui.ExpectedCondition;
|
||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
|
|
@ -66,10 +68,12 @@ public class DataSourcePage extends NavBarPage implements NavBarPage.NavBarItem
|
|||
String jdbcParams) {
|
||||
buttonCreateDataSource().click();
|
||||
|
||||
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(
|
||||
new By.ByClassName("dialog-create-data-source")));
|
||||
|
||||
createDataSourceForm().btnDataSourceTypeDropdown().click();
|
||||
|
||||
new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(
|
||||
new By.ByClassName("dialog-create-data-source")));
|
||||
new WebDriverWait(driver, 10).until(ExpectedConditions.textToBePresentInElement(driver.findElement(By.className("dialog-create-data-source")), dataSourceType.toUpperCase()));
|
||||
|
||||
createDataSourceForm().selectDataSourceType()
|
||||
.stream()
|
||||
|
|
|
|||
Loading…
Reference in New Issue