finalsrebrny Posted July 14, 2015 Posted July 14, 2015 HelloI have got a big problem with script becouse i cant click in LoginMy script:#include <IE.au3> Call ("signIn") Func signIn () Global $oIE = _IECreate ("https://mobile.bet365.com/") Local $username = _IEGetObjByName ($oIE, "username") Local $password = _IEGetObjByName ($oIE, "password") Local $button = _IEGetObjById ($oIE, "LogInPopUpBttn") _IEFormElementSetValue ($username, "name") _IEFormElementSetValue ($password, "pass") _IEAction($button, "click") EndFunc Website button:<div class="LogInBttn" tabindex="99"> <input type="button" id="LogInPopUpBttn" data-nav="LogInUserFromPopUp" value="Zaloguj"> </div> Could you help me ?
jvds Posted July 14, 2015 Posted July 14, 2015 an incomplete example #include <IE.au3> Call ("signIn") Func signIn () Global $oIE = _IECreate ("https://mobile.bet365.com/",1,1,1) $NavBarRight = _IEGetObjByName ($oIE, "NavBarRight") $tag = _IETagNameGetCollection ( $NavBarRight, "a") for $item in $tag ;click login 3 examples ;~ if $item.innerText = 'Log In' then $item.click(); ;~ if $item.classname = "login" then $item.click() ; alternative if $item.classname = "login" then _IEAction($item,"click") ;alternative Consolewrite ("$item.id="&$item.id&@lf) Consolewrite ("$item.tagname="&$item.tagname&@lf) Consolewrite ("$item.classname="&$item.classname&@lf) Consolewrite ("$item.innerText="&$item.innerText&@lf) Next ;set username in popup Local $PopUp_UserName = _IEGetObjByName ($oIE, "PopUp_UserName") _IEFormElementSetValue ($PopUp_UserName, "TEST_USERNAME_1") ;write user name sleep(2000);delay to show you diferent methods $PopUp_UserName.innerText="TEST_USERNAME_2" ;alternative writing username ;set pass in popup Local $PopUp_Password = _IEGetObjByName ($oIE, "PopUp_Password") ; ;examples above ;good night im goint to sleep =P ;hope you get the idea =D EndFuncUse firebug add-on on Firefox or similar on IE to identify the objects and text in the site so its a lot easier to script around it
finalsrebrny Posted July 14, 2015 Author Posted July 14, 2015 i didn't understand your code.Where i can find tutorial about this ?
jvds Posted July 14, 2015 Posted July 14, 2015 did it work? or you just don't understand how i made it work?, its a bit tricky, and i'm not good at it either, that is why I stick my nose in to every IE related topic I can when i have time*Look up users that post around IE topics, for example https://www.autoitscript.com/forum/profile/5125-dalehohm/, his signature have some links to IE tools, and he usually post on IE related topics,*also look up the https://www.autoitscript.com/forum/topic/19368-ieau3-library-builder/ its old, but its a start*google autoit IE + some keywords related to what you want to do , or maybe google the IE function you are already trying to use,so you can look at other users scripts with that function, you can see how and when they use them*install firebug(firefox) or DebugBar(iexplorer) tools, and look at source of website you want to work with, so shine some light on your path else you are working in the dark
Blue_Drache Posted July 15, 2015 Posted July 15, 2015 Bet365 is a gambling company. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Moderators Melba23 Posted July 15, 2015 Moderators Posted July 15, 2015 Blue_Drache,And so.....?M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now