크롬 자동화- 연습 중-안되는 중 > 노트

본문 바로가기
사이트 내 전체검색

노트

메모 크롬 자동화- 연습 중-안되는 중

페이지 정보

profile_image
작성자 최고관리자
댓글 1건 조회 642회 작성일 23-10-20 16:44

본문

#Include Chrome.ahk
;====== 참고 사이트 - https://www.autohotkey.com/boards/viewtopic.php?f=6&t=42890&start=660
;== 최종수정일 : 2023.10.20

;Run, "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222
;
url:="https://sir.kr"
myID := "----"
myPW := "----"
ChromeInst := new Chrome("ChromeProfile")
PageInstance := ChromeInst.GetPage()
;PageInstance.Call("Page.navigate", {"url": "http://acedb.co.kr/gnub5/"})
PageInstance.Call("Page.navigate", {"url": url })

PageInstance.WaitForLoad()
;Send, {Tab} ; Needed to get focus away from address bar for me;

if (instr(PageInstance.Evaluate("document.body.innerText").value,"로그인 중")>0)
return
else
PageInstance.Evaluate("document.getElementById('ol_id').value = """ myID """;" )
PageInstance.Evaluate("document.getElementById('ol_pw').value = """ myPW """;")
PageInstance.Evaluate("document.querySelector('#ol_submit').click();")

Sleep, 1000
;PageInstance.Call("Browser.close")
ExitApp
return
추천0

댓글목록

profile_image

최고관리자님의 댓글

최고관리자 작성일

loop{
try
PageInstance.Evaluate("document.getElementById('ol_id').value='" myID "'; document.getElementById('ol_pw').value='" myPW "'; document.getElementById('ol_submit').click();")
if (instr(PageInstance.Evaluate("document.body.innerText").value,"로그인 중")>0)
break
sleep 100
;GuiControl,,log,% "1- " a_index
if(a_index>500){
MsgBox, "로그인 실패"
errorcode:="timeout"
break
}
}

회원로그인

접속자집계

오늘
49
어제
69
최대
240
전체
57,938

그누보드5
Copyright © acedb.co.kr. All rights reserved.