本文整理汇总了TypeScript中puppeteer.Page.type方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Page.type方法的具体用法?TypeScript Page.type怎么用?TypeScript Page.type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类puppeteer.Page
的用法示例。
在下文中一共展示了Page.type方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: async
return async () => {
await page.click('#create-app');
await page.waitForSelector($dialog.selector());
await page.type($dialog.input('.name'), name);
await page.type($dialog.textarea('.description'), description);
await page.click($dialog.button('.create'));
};
示例2: async
export const login = async (page: Page, user = 'admin', pass = 'admin'): Promise<void> => {
await waitForExists(page, selector.heading(), 'Login');
expect(page.url()).toContain('/login');
await page.type($loginForm.input('.name'), user);
await page.type($loginForm.input('.password'), pass);
await page.click($loginForm.button('.login'));
await waitForExists(page, selector.heading(), 'All Messages');
await waitForExists(page, 'button', 'logout');
};
示例3: async
return async () => {
await page.click('#create-user');
await page.waitForSelector($dialog.selector());
await page.type($dialog.input('.name'), name);
await page.type($dialog.input('.password'), password);
if (isAdmin) {
await page.click($dialog.input('.admin-rights'));
}
await page.click($dialog.button('.save-create'));
await waitToDisappear(page, $dialog.selector());
};
示例4: it
it('changes password of jmattheis', async () => {
await page.click($table.cell(3, Col.EditDelete, '.edit'));
await page.waitForSelector($dialog.selector());
await page.type($dialog.input('.password'), 'unicorn');
await page.click($dialog.button('.save-create'));
await waitToDisappear(page, $dialog.selector());
});
示例5: async
return async () => {
await page.click('#create-client');
await page.waitForSelector($dialog.selector());
await page.type($dialog.input('.name'), name);
await page.click($dialog.button('.create'));
};