當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Node.Remote類代碼示例

本文整理匯總了TypeScript中intern/lib/executors/Node.Remote的典型用法代碼示例。如果您正苦於以下問題:TypeScript Remote類的具體用法?TypeScript Remote怎麽用?TypeScript Remote使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Remote類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: getPage

function getPage(test: Test) {
	const { browserName = '' } = test.remote.environmentType!;
	if (browserName.toLowerCase() === 'microsoftedge') {
		test.skip('example page currently doesn\'t work in edge.');
	}
	const remote: Remote = test.remote;
	return remote
		.get(`http://localhost:9000/_build/common/example/?id=${uuid()}#range-slider`)
		.setFindTimeout(5000);
}
開發者ID:dojo,項目名稱:widgets,代碼行數:10,代碼來源:RangeSlider.ts

示例2: getPage

function getPage(test: any) {
	const { browserName } = test.remote.environmentType;
	if (browserName.toLowerCase() === 'microsoftedge') {
		test.skip('example page currently doesn\'t work in edge.');
	}
	const remote: Remote = test.remote;
	return remote
		.get('http://localhost:9000/_build/common/example/?module=slider')
		.setFindTimeout(5000);
}
開發者ID:bitpshr,項目名稱:widgets,代碼行數:10,代碼來源:Slider.ts

示例3: openDialog

function openDialog(remote: Remote, { closeable = true, modal, underlay }: Options = {}) {
	let promise = remote
		.get(`http://localhost:9000/_build/common/example/?id=${uuid()}#dialog`)
		.setFindTimeout(5000);

	if (!closeable) {
		promise = promise
			.findById('closeable')
				.click()
				.end();
	}

	if (modal) {
		promise = promise
			.findById('modal')
				.click()
				.end();
	}

	if (underlay) {
		promise = promise
			.findById('underlay')
				.click()
				.end();
	}

	return promise
		.findById('button')
			.click()
			.end()
		.sleep(DELAY);
}
開發者ID:bryanforbes,項目名稱:widgets,代碼行數:32,代碼來源:Dialog.ts

示例4: clickDate

function clickDate(remote: Remote) {
	return remote
		.get('http://localhost:9000/_build/common/example/?module=calendar')
		.setFindTimeout(5000)
		.findByCssSelector(`tbody > tr:first-child > td:nth-child(${firstDay + 1})`)
			.click()
			.sleep(DELAY)
			.end();
}
開發者ID:dylans,項目名稱:widgets,代碼行數:9,代碼來源:Calendar.ts

示例5: openYearPicker

function openYearPicker(remote: Remote) {
	return remote
		.get('http://localhost:9000/_build/common/example/?module=calendar')
		.setFindTimeout(5000)
		.findByCssSelector(`.${css.yearTrigger}`)
			.click()
			.sleep(DELAY)
			.end();
}
開發者ID:dylans,項目名稱:widgets,代碼行數:9,代碼來源:Calendar.ts

示例6: openMonthPicker

function openMonthPicker(remote: Remote) {
	return remote
		.get(`http://localhost:9000/_build/common/example/?id=${uuid()}#calendar`)
		.setFindTimeout(5000)
		.findByCssSelector(`.${css.monthTrigger}`)
			.click()
			.sleep(DELAY)
			.end();
}
開發者ID:bryanforbes,項目名稱:widgets,代碼行數:9,代碼來源:Calendar.ts

示例7: clickDate

function clickDate(remote: Remote) {
	return remote
		.get(`http://localhost:9000/_build/common/example/?id=${uuid()}#calendar`)
		.setFindTimeout(5000)
		.findByCssSelector(firstDayCssSelector())
			.click()
			.sleep(DELAY)
			.end();
}
開發者ID:dojo,項目名稱:widgets,代碼行數:9,代碼來源:Calendar.ts

示例8: openYearPicker

function openYearPicker(remote: Remote) {
	return remote
		.get(`http://localhost:9000/_build/common/example/?id=${uuid()}#calendar`)
		.setFindTimeout(5000)
		.findByClassName(css.yearTrigger)
			.click()
			.sleep(DELAY)
			.end();
}
開發者ID:dojo,項目名稱:widgets,代碼行數:9,代碼來源:Calendar.ts

示例9: openSlidePane

function openSlidePane(remote: Remote, alignRight?: boolean) {
	let promise = remote
		.get('http://localhost:9000/_build/common/example/?module=slidepane')
		.setFindTimeout(5000)
		.findById('underlay')
			.click()
			.end();

	if (alignRight) {
		promise = promise
			.findById('alignRight')
				.click()
				.end();
	}

	return promise
		.findById('button')
			.click()
			.end()
		.sleep(DELAY);
}
開發者ID:bitpshr,項目名稱:widgets,代碼行數:21,代碼來源:SlidePane.ts

示例10: getPage

function getPage(remote: Remote) {
	return remote
		.get('http://localhost:9000/_build/common/example/?module=tabcontroller')
		.setFindTimeout(5000);
}
開發者ID:bitpshr,項目名稱:widgets,代碼行數:5,代碼來源:TabController.ts


注:本文中的intern/lib/executors/Node.Remote類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。