本文整理匯總了TypeScript中selenium-webdriver.until.titleMatches方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript until.titleMatches方法的具體用法?TypeScript until.titleMatches怎麽用?TypeScript until.titleMatches使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類selenium-webdriver.until
的用法示例。
在下文中一共展示了until.titleMatches方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: TestUntilModule
function TestUntilModule() {
let driver: webdriver.WebDriver = new webdriver.Builder().
withCapabilities(webdriver.Capabilities.chrome()).
build();
let conditionB: webdriver.Condition<boolean> = new webdriver.Condition<boolean>('message', (driver: webdriver.WebDriver) => true);
let conditionBBase: webdriver.Condition<boolean> = conditionB;
let conditionWebElement: webdriver.WebElementCondition;
let conditionWebElements: webdriver.Condition<webdriver.WebElement[]>;
conditionB = webdriver.until.ableToSwitchToFrame(5);
let conditionAlert: webdriver.Condition<webdriver.Alert> = webdriver.until.alertIsPresent();
let el: webdriver.WebElement = driver.findElement(webdriver.By.id('id'));
conditionB = webdriver.until.stalenessOf(el);
conditionB = webdriver.until.titleContains('text');
conditionB = webdriver.until.titleIs('text');
conditionB = webdriver.until.titleMatches(/text/);
conditionB = webdriver.until.urlContains('text');
conditionB = webdriver.until.urlIs('text');
conditionB = webdriver.until.urlMatches(/text/);
conditionWebElement = webdriver.until.elementIsDisabled(el);
conditionWebElement = webdriver.until.elementIsEnabled(el);
conditionWebElement = webdriver.until.elementIsNotSelected(el);
conditionWebElement = webdriver.until.elementIsNotVisible(el);
conditionWebElement = webdriver.until.elementIsSelected(el);
conditionWebElement = webdriver.until.elementIsVisible(el);
conditionWebElement = webdriver.until.elementLocated(webdriver.By.id('id'));
conditionWebElement = webdriver.until.elementTextContains(el, 'text');
conditionWebElement = webdriver.until.elementTextIs(el, 'text');
conditionWebElement = webdriver.until.elementTextMatches(el, /text/);
conditionWebElements = webdriver.until.elementsLocated(webdriver.By.className('class'));
}