Skip to content

Commit dd87b8d

Browse files
authored
Create 自動化
1 parent 66b3050 commit dd87b8d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

examples/python/自動化

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from selenium import webdriver
2+
from selenium.webdriver.common.by import By
3+
from selenium.webdriver.chrome.service import Service
4+
import time
5+
6+
# ChromeDriverのパス(適宜変更してください)
7+
service = Service(executable_path="/path/to/chromedriver")
8+
9+
# ブラウザ起動
10+
driver = webdriver.Chrome(service=service)
11+
12+
# Airワーク採用管理のログインページにアクセス
13+
driver.get("https://airwork.recruit.co.jp/") # URLを正確に入力してください
14+
15+
# ページ読み込み待機(必要に応じて調整)
16+
time.sleep(2)
17+
18+
# 「ログイン」ボタンをクリック(テキスト一致で取得)
19+
login_button = driver.find_element(By.XPATH, "//button[contains(text(), 'ログイン')]")
20+
login_button.click()
21+
22+
# (必要に応じてログインフォーム入力に続く)
23+
24+
# 終了処理(確認用に5秒待機して閉じる)
25+
time.sleep(5)
26+
driver.quit()

0 commit comments

Comments
 (0)