๋๋ webdriverio ๋ชจ์นด๋ฅผ ์ฌ์ฉํ๊ณ ์์ต๋๋ค
์์๋ฅผ ํด๋ฆญํ ์ ์์ต๋๋ค.
๋๋ ํญ์ ๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค
์ฃผ์ด์ง ๊ฒ์ ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ ํ์ด์ง์์ ์์๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.
Node.js ๋ฒ์ :4.2.6
[๋ ๋ฆฝํ ๋ชจ๋]
_full_ Selenium/WebdriverIO ๋ก๊ทธ๋ฅผ ๋ถ์ฌ๋ฃ์ ์์ง ๋ฅผ ๋ง๋ค๊ณ ์ฌ๊ธฐ์ ์ฐ๊ฒฐํ์ธ์. ์ ์ฒด Appium ๋ก๊ทธ๋ฅผ ์ฌ๊ธฐ์ ๋ถ์ฌ๋ฃ์ง _ํ์ง__ ๋ง์ญ์์ค. ์ด ๋ฌธ์ ๊ฐ ๋งค์ฐ ๊ธธ๊ณ ์ฝ๊ธฐ ์ด๋ ค์ธ ์ ์์ต๋๋ค! ๋ฒ๊ทธ๋ฅผ ๋ณด๊ณ ํ๋ ๊ฒฝ์ฐ Selenium/WebdriverIO ๋ก๊ทธ๋ฅผ _ํญ์_ ํฌํจํ์ญ์์ค!
์ด๊ฒ์ ๋์ ์ํ์ด๋ค
describe ('FAFSA', function () {
beforeEach(function() {
browser.url('/');
})
it ('should look good', function () {
browser.click("//*[@id='start']");
browser.click("//*[@id='inner-content']/section/div/div/div[1]/div/a");
});
});
๊ทธ๋ฆฌ๊ณ ์ด๊ฒ์ ํ์ด์ง์ ์์์ ๋๋ค
<div id="inner-content" ng-view="" class="right-panel ng-scope"><section class="page-block select-type ng-scope" ng-show="ready"><div class="select-type__wrapper"><div class="row"><div class="col-sm-6"><!-- ngIf: device === 'phone' --><!-- ngIf: device !== 'phone' --><div ng-if="device !== 'phone'" class="block ng-scope"><a ng-activate="" ng-click="startApplication('?json=true')" class="btn btn-answer first ng-scope ng-click-active"></div><!-- end ngIf: device !== 'phone' --></div><div class="col-sm-6"><!-- ngIf: device === 'phone' --><!-- ngIf: device !== 'phone' --><div ng-if="device !== 'phone'" class="block second ng-scope"><a ng-activate="" ng-click="startApplication('?parent-user=true&json=true')" class="btn btn-answer ng-scope ng-click-active"></div><!-- end ngIf: device !== 'phone' --></div></div></div></section></div>
์ ํ๊ธฐ๊ฐ ์์๋ฅผ ์ฐพ์ง ๋ชปํ์ต๋๋ค. ๋ค๋ฅธ ์ ํ๊ธฐ๋ฅผ ์ฌ์ฉํ๊ฑฐ๋ ํ์ด์ง๋ฅผ ๋๋ฒ๊ทธํ์ฌ ์์ ํ์ด์ง์ ์๋์ง ํ์ธํ์ญ์์ค.
๋๋ ๋ํ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค
module.exports = ํจ์() {
this.Given(/^bct-test.ucdavis.edu$/๋ฅผ ๋ฐฉ๋ฌธํ์ต๋๋ค. function() {
browser.url('https://bct-test.ucdavis.edu/bct_nation/home.seam');
});
this.When(/^ ๋ด๊ฐ ์ฒดํํ ์ฐพ์๋ณด๊ธฐ๋ฅผ ํด๋ฆญ$/, function() {
browser.click('#ํ ์ฐพ์๋ณด๊ธฐ ๋ฒํผ');
});
this.Then(/^I see All Trials$/, function() {
browser.screenshot('BrowseTrialsMetastaticLink.png');
});
this.When(/^I search All Trials for "([^"] )" or "([^"] )"$/, function (SearchTerm1, SearchTerm2) {
// ์์ ๋ฌธ๊ตฌ๋ฅผ ๊ตฌ์ฒด์ ์ธ ๋์์ผ๋ก ๋ฐ๊พธ๋ ์ฝ๋๋ฅผ ์์ฑํ์ธ์.
browser.setValue('์
๋ ฅ[๊ฒ์_์ฟผ๋ฆฌ_์ฉ์ด1="R"]', ๊ฒ์์ฉ์ด1);
browser.setValue('์
๋ ฅ[๊ฒ์_์ฟผ๋ฆฌ_์ฉ์ด2="O"]', ๊ฒ์์ฉ์ด2);
๋ธ๋ผ์ฐ์ .ํด๋ฆญ(['๊ฒ์์ด๋']);
});
this.Then(/^I see All Trials for "Reproductive" and "Online"$/, function () {
var my_expected_text='์ํ์ ํฌํจ๋จ';
var my_displayed_text = document.getElementsByClassName('ContentHeaderText');
๊ธฐ๋(my_displayed_text).toBe(my_expected_text);
});
}
์๋ฌ ๋ฉ์์ง:
[์นจํฌ์ง] ๋ฌ๋ฆฌ๊ณ ...
๊ธฐ๋ฅ: ๋ชจ๋ ํ๊ฐํ ๊ฒ์
As a breast canceer patient
I want to search the All Trials on the web
So I can find information
์๋๋ฆฌ์ค: ์์ ๋๋ ์จ๋ผ์ธ ๊ฒ์
โ bct-test.ucdavis.edu๋ฅผ ๋ฐฉ๋ฌธํ์์ ๊ฐ์ํ ๋
โ "Reproductive" ๋๋ "Online"์ ๋ํ ๋ชจ๋ ์ํ์ ๊ฒ์ํ ๋
์คํจ:
1) ์๋๋ฆฌ์ค: ์์ ๋๋ ์จ๋ผ์ธ ๊ฒ์ - ๊ธฐ๋ฅ/๊ฒ์ ์ ์ฒด ์๋. ๊ธฐ๋ฅ:7
๋จ๊ณ: "Reproductive" ๋๋ "Online"์ ๋ํ ๋ชจ๋ ํ๊ฐํ์ ๊ฒ์ํ ๋ - ๊ธฐ๋ฅ/๊ฒ์ ๋ชจ๋. ๊ธฐ๋ฅ:9
๋จ๊ณ ์ ์: features/support/searchalltrials.js:13
๋ฉ์ธ์ง:
์ค๋ฅ: ์ฃผ์ด์ง ๊ฒ์ ๋งค๊ฐ๋ณ์("input[Search_Query_Term1="R"]")๋ฅผ ์ฌ์ฉํ์ฌ ํ์ด์ง์์ ์์๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.
์๋์์.
_combinedTickCallback์์ (๋ด๋ถ/ํ๋ก์ธ์ค/next_tick.js:73:7)
process._tickDomainCallback์์ (๋ด๋ถ/ํ๋ก์ธ์ค/next_tick.js:128:9)
์๋๋ฆฌ์ค 1๊ฐ(1๊ฐ ์คํจ)
3๋จ๊ณ(1๊ฐ ์คํจ, 1๊ฐ ๊ฑด๋๋ฐ๊ธฐ, 1๊ฐ ํต๊ณผ)
0m02.189s