Jump to content

Web Botu


panceh
 Share

Recommended Posts

bot web sayfasına gidip textboxa istediğimi yazıcak ama soyle bir sıkıntı texboxa id verilmemiş.Class degeri atanmış id olmadı için gönderemiyorum class göre atama yapabilirmiyim acaba

#include <IE.au3>

$oIE = _IECreate("https://wwww.test.com")
$aArray = _IEGetObjByClass($oIE, "topHolder", "div")
$o = $aArray[1]

MsgBox(1, "test", $o.innerText)
Sleep("2000")
_IEPropertySet($aArray ,'input','test')

Func _IEGetObjByClass($oIE, $sClass, $input = "*")
    Local $aRet[2] = [0]

    Local $allHTMLTags = _IETagNameGetCollection($oIE, $input)
    For $o In $allHTMLTags
        If IsString($o.className) And $o.className = $sClass Then
            $aRet[0] += 1
            ReDim $aRet[$aRet[0] + 1]
            $aRet[$aRet[0]] = $o
        EndIf
    Next

    Return $aRet
EndFunc   ;==>_IEGetObjByClass

Burda İnputtun bulundugu div buluyorum ama inputta yazı yazdıramıyorum

 

 

http://n1305.hizliresim.com/19/1/mns18.jpg

Edited by panceh
Link to comment
Share on other sites

Böyle bir şeyi hiç yapmadım ama yapılabilir bence. IE.au3 kütüphanesini incele.

 

_IEErrorHandlerRegister()

_IELoadWaitTimeout()
_IECreate()
_IEFormGetObjByName()
_IEFormElementGetObjByName()
_IEFormElementSetValue()
_IEAction()

 

Aha da bu komutları güzel bir incelersen yaparsın. (İnternet Explorer üzerinden.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...