_______________________________________________________________________________________________________________ϒϥ΢β͕ࣗಈͰಈ͘SeleniumΛ࢖ͬͯΈ·ͨ͠~Rubyฤ~ࣗ‫঺ݾ‬հ_______________________________________________________________________________________________________________͔͞΋ͱName :ͦ͏ࡔຊ ૝ϑΝʔΤϯυςΫϊϩδʔCompany :ɹɹɹɹɹɹɹɹ‫ࣜג‬ձࣾʢೖࣾ̎೥໨ʣωοτϫʔΫɺAWSɺRubyͳͲΛษ‫ڧ‬த_______________________________________________________________________________________________________________

Seleniumͱ͸ʁseleniumͱ͸ʁ_______________________________________________________________________________________________________________ϒϥ΢βͷΦʔτϝʔγϣϯπʔϧ

_______________________________________________________________________________________________________________

Seleniumͱͷग़ձ͍

seleniumͱͷग़ձ͍_______________________________________________________________________________________________________________

҆৺ɾ҆શηΩϡϦςΟνΣοΫ_______________________________________________________________________________________________________________

ηΩϡϦςΟνΣοΫʁ

@@@@@_______________________________________________________________________________________________________________

ChromeRedmineૢ࡞proxy

@@@@@_______________________________________________________________________________________________________________

ChromeproxyΫϩʔϧRedmineૢ࡞σʔλ@@@@@_______________________________________________________________________________________________________________

ChromeproxyΫϩʔϧRedmineૢ࡞σʔλνΣοΫ

@@@@@_______________________________________________________________________________________________________________

ChromeproxyΫϩʔϧRedmineૢ࡞σʔλνΣοΫ

ηΩϡϦςΟνΣοΫʁ_______________________________________________________________________________________________________________

ࣗಈԽͰ͖Δͱ͍͍ͶηΩϡϦςΟνΣοΫʁ_______________________________________________________________________________________________________________

ࣗಈԽͰ͖Δͱ͍͍Ͷ

SeleniumΛ࢖ͬͯRedmineΫϩʔϧσʔλ࡞੒ΛࣗಈԽ͠Α͏

@@@@@_______________________________________________________________________________________________________________

ChromeproxyίίΛࣗಈԽʂΫϩʔϧRedmineૢ࡞σʔλνΣοΫ

_______________________________________________________________________________________________________________

SeleniumͰಈ͘Redmine

_______________________________________________________________________________________________________________

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍
̎

34

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍
̎

34

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍ϒϥ΢β‫ى‬ಈ

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍ϒϥ΢β‫ى‬ಈ:firefoxͰ΋OKseleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍
̎

34

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̎

ࢦఆͨ͠URLͷϖʔδʹɹΞΫηεͰ͖ΔϖʔδભҠseleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍
̎

34

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̏

ཁૉऔಘ

ཁૉΛࢦఆ

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________:name, :xpath

̏

ཁૉऔಘ

Ͱ΋OK

ཁૉΛࢦఆ

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̏ςΩετೖྗ

ςΩετͷ಺༰

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̍
̎

34

seleniumͰಈ͘redmine_______________________________________________________________________________________________________________

̐ΫϦοΫΫϦοΫ_______________________________________________________________________________________________________________

ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒଴‫ॲػ‬ཧ~Ԡ༻ฤ~ӈΫϦοΫʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒

Mac :command + a

Windows :control + aʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒࢖͏ϝιου͸?

send_keys
A ʊʊʊʊʊʊʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒ଞʹ΋ɺɺɾΧʔιϧΛઌ಄ʹҠಈɾϑΝΠϧఴ෇࢖͏ϝιου͸?

send_keys
A ʊʊʊʊʊʊʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒macͷ৔߹ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________શબ୒windowsͷ৔߹:controlʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧϑΝΠϧఴ෇ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧఴ෇ΫϦοΫϑΝΠϧΤϥʔ͕දࣔ͞ΕΔʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧʁʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧ̍̎

3waitΛ࢖͏ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧ̍̎

3waitΛ࢖͏ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧ̍̎

3waitΛ࢖͏ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ_______________________________________________________________________________________________________________଴‫ॲػ‬ཧ̍̎

3waitΛ࢖͏ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ
_______________________________________________________________________________________________________________~Ԡ༻ฤ~ӈΫϦοΫӈΫϦοΫͷϝιου‫ݟ‬౰ͨΒͳ͔ͬͨɺɺෳ਺ͷϝιου૊Έ߹Θͤʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ
_______________________________________________________________________________________________________________~Ԡ༻ฤ~ӈΫϦοΫmacͷ৔߹

control +ΫϦοΫ windowsͷ৔߹||ӈΫϦοΫ

ʮShiftʯʴʮF10ʯΒ͍͠Ͱ͢ʂʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ
_______________________________________________________________________________________________________________

~Ԡ༻ฤ~
ӈΫϦοΫ

࢖͏ϝιου͸?

clickɺkey_downɺkey_up
A ʊʊʊʊʊʊʊʊʊʊ____________

ʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ
_______________________________________________________________________________________________________________

~Ԡ༻ฤ~
ӈΫϦοΫ

key_down . . . ΩʔϘʔυΛԡԼͨ͠ঢ়ଶͷ··ʹ͢Δʮ͜Μͳ͜ͱ΋Ͱ͖Δͷʁʯͱࢥͬͨ͜ͱ
_______________________________________________________________________________________________________________

~Ԡ༻ฤ~
ӈΫϦοΫ

key_down . . . ΩʔϘʔυΛԡԼͨ͠ঢ়ଶͷ··ʹ͢Δkey_up . . . ԡԼͨ͠ΩʔϘʔυΛ཭͢_______________________________________________________________________________________________________________

SeleniumΛ࢖ͬͯΈͯ

seleniumΛ࢖ͬͯΈͯ_______________________________________________________________________________________________________________͘͢͝೉ͦ͠͏શબ୒ɺӈΫϦοΫͳͲͷࡉ͔͍ૢ࡞͸Ͱ͖ͳͦ͞͏Τϥʔ͹͔ͬग़ͦ͏

seleniumΛ࢖ͬͯΈͯ_______________________________________________________________________________________________________________͘͢͝೉ͦ͠͏࢖͍ํ͸؆୯શબ୒ɺӈΫϦοΫͳͲͷࡉ͔͍ૢ࡞͸Ͱ͖ͳͦ͞͏ࡉ͔͍ૢ࡞΋Ͱ͖ΔΤϥʔ͹͔ͬग़ͦ͏৘ใ͕ଟ͍ͨΊ͙͢ղܾͰ͖Δ

seleniumΛ࢖ͬͯΈͯ_______________________________________________________________________________________________________________͘͢͝೉ͦ͠͏શબ୒ɺӈΫϦοΫͳͲͷࡉ͔͍ૢ࡞͸Ͱ͖ͳͦ͞͏ը໘͕ಈָ͍͍ͯ͠࢖͍ํ͸؆୯ࡉ͔͍ૢ࡞΋Ͱ͖ΔΤϥʔ͹͔ͬग़ͦ͏৘ใ͕ଟ͍ͨΊ͙͢ղܾͰ͖Δ

seleniumΛ࢖ͬͯΈͯ_______________________________________________________________________________________________________________

Selenium~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

࣮ߦࣗಈͰը໘͕ಈ͘

Ϋϩʔϧσʔλ_______________________________________________________________________________________________________________

͜Μͳϝιου΋͋Δ͜Μͳ͜ͱ΋Ͱ͖Δʂ_______________________________________________________________________________________________________________͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ