Jump to content

Recommended Posts

Posted

The grammar may be wrong or English may not be correct.
 

i want portal automatic login in 'https://www.vaatz.com/'

i try sen key and set value this portal , but not working login logic

autoit set value function is not working on password input tag.

That framework is nexa framework.

i try code below

That code is on only success ,then user try login action

 

my code

#NoTrayIcon
#AutoIt3Wrapper_Change2CUI=y
#include <Array.au3>
#include <IE.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
#include <Misc.au3>
$oIE = _IECreate("https://www.vaatz.com")

Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)

Local $oFrames = _IETagNameGetCollection($oIE, "frame")
Local $iFrame = 0
For $oFrame In $oFrames
   If StringInStr(String($oFrame.name), "VaatzMainFrame") Then
      EndIf
      ExitLoop
      $iFrame += 1
Next

$oFrame = _IEFrameGetCollection($oIE, $iFrame)
$tags = $oFrame.document.GetElementsByTagName("input")
For $tag in $tags
   $class_value = $tag.GetAttribute("id")
   If $class_value = "mainframe.VFrameSet.frameLogin.form.divLogin.form.divLoginInner.form.cboHost.comboedit:input" Then
      Sleep(300)
      _IEFormElementSetValue($tag, "KOREA - KOREAN" & '{ENTER}')
      Sleep(300)

   ElseIf $class_value="mainframe.VFrameSet.frameLogin.form.divLogin.form.divLoginInner.form.edId:input" Then
      _IEFormElementSetValue($tag, "test123")
      Sleep(300)
      send('{TAB}')
      Sleep(300)
      send("test1234")
      send('{TAB}')
      Sleep(300)
      send('{TAB}')
      send('{TAB}')
      send('{TAB}')
      send('{TAB}')
      send('{TAB}')
      send('{TAB}')
      send('{TAB}')
      send('{ENTER}')
   EndIf
Next

 

Posted

Please use this tool when you post code.

The following code works for me to set id/pw :

#include <IE.au3>

$oIE = _IECreate("https://www.vaatz.com")
Local $oFrame = _IEFrameGetObjByName ($oIE, "VaatzMainFrame")

Local $oID = _IEGetObjById ($oFrame, "mainframe.VFrameSet.frameLogin.form.divLogin.form.divLoginInner.form.edId:input")
_IEFormElementSetValue ($oID, "MyUser")
Local $oPW = _IEGetObjById ($oFrame, "mainframe.VFrameSet.frameLogin.form.divLogin.form.divLoginInner.form.edPwd:input")
_IEFormElementSetValue ($oPW, "MyPass")

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...