本文整理匯總了TypeScript中e2e-test/core/pageObjects.Selector類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Selector類的具體用法?TypeScript Selector怎麽用?TypeScript Selector使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Selector類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ClickablePageObject
export const dashboardsPageFactory = (dashboardTitle: string) =>
new TestPage<DashboardsPage>({
url: '/dashboards',
pageObjects: {
dashboard: new ClickablePageObject(Selector.fromAriaLabel(dashboardTitle)),
},
});
示例2: ClickablePageObject
import { ClickablePageObjectType, ClickablePageObject, Selector } from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface CreateDashboardPage {
addQuery: ClickablePageObjectType;
}
export const createDashboardPage = new TestPage<CreateDashboardPage>({
url: '/dashboard/new',
pageObjects: {
addQuery: new ClickablePageObject(Selector.fromAriaLabel('Add Query CTA button')),
},
});
示例3: ClickablePageObject
import { ClickablePageObject, Selector, ClickablePageObjectType } from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface AddDataSourcePage {
testDataDB: ClickablePageObjectType;
}
export const addDataSourcePage = new TestPage<AddDataSourcePage>({
url: '/datasources/new',
pageObjects: {
testDataDB: new ClickablePageObject(Selector.fromAriaLabel('TestData DB datasource plugin')),
},
});
示例4: ClickablePageObject
import { ClickablePageObjectType, ClickablePageObject, Selector } from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface SharePanelModal {
directLinkRenderedImage: ClickablePageObjectType;
}
export const sharePanelModal = new TestPage<SharePanelModal>({
pageObjects: {
directLinkRenderedImage: new ClickablePageObject(Selector.fromAriaLabel('Link to rendered image')),
},
});
示例5: InputPageObject
import {
ClickablePageObjectType,
ClickablePageObject,
Selector,
InputPageObjectType,
InputPageObject,
} from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface SaveDashboardModal {
name: InputPageObjectType;
save: ClickablePageObjectType;
}
export const saveDashboardModal = new TestPage<SaveDashboardModal>({
pageObjects: {
name: new InputPageObject(Selector.fromAriaLabel('Save dashboard title field')),
save: new ClickablePageObject(Selector.fromAriaLabel('Save dashboard button')),
},
});
示例6: InputPageObject
import {
InputPageObject,
ClickablePageObject,
Selector,
InputPageObjectType,
ClickablePageObjectType,
} from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface LoginPage {
username: InputPageObjectType;
password: InputPageObjectType;
submit: ClickablePageObjectType;
}
export const loginPage = new TestPage<LoginPage>({
url: '/login',
pageObjects: {
username: new InputPageObject(Selector.fromAriaLabel('Username input field')),
password: new InputPageObject(Selector.fromAriaLabel('Password input field')),
submit: new ClickablePageObject(Selector.fromAriaLabel('Login button')),
},
});
示例7: ClickablePageObject
import {
SelectPageObjectType,
SelectPageObject,
Selector,
ClickablePageObjectType,
ClickablePageObject,
} from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface EditPanelPage {
queriesTab: ClickablePageObjectType;
saveDashboard: ClickablePageObjectType;
scenarioSelect: SelectPageObjectType;
showXAxis: ClickablePageObjectType;
visualizationTab: ClickablePageObjectType;
}
export const editPanelPage = new TestPage<EditPanelPage>({
pageObjects: {
queriesTab: new ClickablePageObject(Selector.fromAriaLabel('Queries tab button')),
saveDashboard: new ClickablePageObject(Selector.fromAriaLabel('Save dashboard navbar button')),
scenarioSelect: new SelectPageObject(Selector.fromAriaLabel('Scenario Select')),
showXAxis: new ClickablePageObject(Selector.fromSelector('[aria-label="X-Axis section"] > gf-form-switch')),
visualizationTab: new ClickablePageObject(Selector.fromAriaLabel('Visualization tab button')),
},
});
示例8: ClickablePageObject
import {
ClickablePageObjectType,
PageObjectType,
ClickablePageObject,
PageObject,
Selector,
} from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface EditDataSourcePage {
saveAndTest: ClickablePageObjectType;
alert: PageObjectType;
alertMessage: PageObjectType;
}
export const editDataSourcePage = new TestPage<EditDataSourcePage>({
pageObjects: {
saveAndTest: new ClickablePageObject(Selector.fromAriaLabel('Save and Test button')),
alert: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert')),
alertMessage: new PageObject(Selector.fromAriaLabel('Datasource settings page Alert message')),
},
});
示例9: ClickablePageObject
import { ClickablePageObjectType, ClickablePageObject, Selector } from 'e2e-test/core/pageObjects';
import { TestPage } from 'e2e-test/core/pages';
export interface Panel {
panelTitle: ClickablePageObjectType;
share: ClickablePageObjectType;
}
export const panel = new TestPage<Panel>({
pageObjects: {
panelTitle: new ClickablePageObject(Selector.fromAriaLabel('Panel Title')),
share: new ClickablePageObject(Selector.fromAriaLabel('Share panel menu item')),
},
});