furoblog’s blog

妻と一緒にはじめました。1日1更新が目標です。

protractorでSelect Boxのオプションを選択する

中々検索に時間がかかったのでメモ

 

import { browser, element, by} from 'protractor'
describe('Protractor Typescript Demo', function() {
	browser.ignoreSynchronization = true; // for non-angular websites
	it('Excel File Operations', function() {
		// set implicit time to 30 seconds
		browser.manage().timeouts().implicitlyWait(30000);

		browser.get("https://chercher.tech/practice/dropdowns")

		// find click the dropdown
		element(by.tagName("select#first")).click();
		// add sleep to give a time for te options to reveal
		browser.sleep(1000)
		// click the option which has value='Yahoo'
		element(by.css("#first [value='Yahoo']")).click();
	});

 

chercher.tech