URL을 탐색하고 로그인 한 다음 특정 URL로 이동할 수 있습니다. 이제 나는 파일 업로드 레벨을 때렸다. 아무도 나를 도울 수 있습니까?Powerbuilder에서 웹 사이트에 액세스하고 파일 객체 제어를 위해 파일 업로드/매핑
변수 유형이 '파일'로오고, PB에서 파일 경로와 이름을 전달하는 법입니다. 다음은 내 스크립트
IE = CREATE OLEObject
IE.ConnectToNewObject("InternetExplorer.Application")
IE.left=200
IE.top=200
IE.height=400
IE.width=400
IE.menubar=1
IE.toolbar=1
IE.statusBar=1
IE.navigate("http://www.xyz.in/index.php")
IE.visible=1
SetForegroundWindow(IE.HWND)
DO WHILE IE.Busy
Yield()
LOOP
li_form_ctr = IE.Document.Forms.Length
if li_form_ctr = 1 then
li_form_ctr = li_form_ctr - 1
IE.Document.Forms[li_form_ctr].Elements.username.Value = 'Test'
IE.Document.Forms[li_form_ctr].Elements.password.Value = '[email protected]'
ls_OldURL = IE.LocationURL
IE.Document.Forms[li_form_ctr].Elements.submit.Click()
else
return
end if
DO WHILE IE.Busy
Yield()
LOOP
if ls_OldURL = IE.LocationURL then
messagebox("Error","Either User Name/Password Wrong")
else
IE.navigate("http://www.xyz.in/upload_ecr_latest.php")
DO WHILE IE.Busy
Yield()
LOOP
sleep(2)
li_form_ctr = 0
li_form_ctr = IE.Document.Forms.Length
if li_form_ctr = 1 then
li_form_ctr = li_form_ctr - 1
IE.Document.Forms[li_form_ctr].Elements.month.Value = '08'
IE.Document.Forms[li_form_ctr].Elements.year.Value = '2014'
IE.Document.Forms[li_form_ctr].Elements.ecr = "D:\temp\xyz.txt" -- This one is Not working
ls_OldURL = IE.LocationURL
IE.Document.Forms[li_form_ctr].Elements.upload.Click()
else
return
end if
end if
는 나라야나
나는 운이 좋음에도 불구하고 inet을 시도했지만 샘플 코드가 있다면 나에게 제공 할 수있다. 나는 또한 행운을 빌어 요 winhttp 방법을 시도했다. –