本文整理匯總了TypeScript中selenium-webdriver/testing.describe函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript describe函數的具體用法?TypeScript describe怎麽用?TypeScript describe使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了describe函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: TestTestingModule
function TestTestingModule() {
testing.before(function () {
});
testing.beforeEach(function () {
});
testing.describe("My test suite", function () {
testing.it("My test", function () {
});
testing.iit("My exclusive test.", function () {
});
});
testing.xdescribe("My disabled suite", function () {
testing.xit("My disabled test.", function () {
});
});
testing.after(function () {
});
testing.afterEach(function () {
});
}
示例2: TestTestingModule
function TestTestingModule() {
testing.before(() => {
});
testing.beforeEach(() => {
});
testing.describe('My test suite', () => {
testing.it('My test', () => {
});
testing.iit('My exclusive test.', () => {
});
});
testing.xdescribe('My disabled suite', () => {
testing.xit('My disabled test.', () => {
});
});
testing.after(() => {
});
testing.afterEach(() => {
});
}
示例3: describe
import { Builder, By, until, WebDriver } from 'selenium-webdriver';
import { describe, before, after, it, ignore, xdescribe, xit, beforeEach, afterEach, controlFlow } from 'selenium-webdriver/testing';
describe('Google Search', () => {
let driver: WebDriver;
before(() => {
driver = new Builder().forBrowser('firefox').build();
});
beforeEach(() => { });
after(() => {
driver.quit();
});
afterEach(() => { });
it('should append query to title', () => {
const flow = controlFlow();
flow.execute(() => {
driver.get('http://www.google.com/ncr');
driver.findElement(By.name('q')).sendKeys('webdriver');
driver.findElement(By.name('btnG')).click();
driver.wait(until.titleIs('webdriver - Google Search'), 1000);
});
});
});
ignore(maybe).it('is flaky', () => {
if (Math.random() < 0.5) throw Error();