Tripoz Posted July 10, 2015 Share Posted July 10, 2015 (edited) hi,how to click that button on my pict (Sell at market) i tried this code but not works:--edited-- Edited August 11, 2015 by Tripoz Link to comment Share on other sites More sharing options...
Danp2 Posted July 10, 2015 Share Posted July 10, 2015 i tried this code but not works:"Doesn't work" isn't detailed enough for us to assist you. Post the results from the Scite output window. You could also add some error checking to the code. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Jefrey Posted July 10, 2015 Share Posted July 10, 2015 Since this button has an ID, what if you do:#include <IE.au3> Local $oIE = _IECreate("http://yourpage.com") Local $oDiv = _IEGetObjById($oIE, "sell_at_market") _IEAction($oDiv, "click")Because, in your script, you're trying to get an object which name="sell_at_market", but this is not the case of the button (its id="sell_at_market", and it has no name). My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
Tripoz Posted July 10, 2015 Author Share Posted July 10, 2015 (edited) "Doesn't work" isn't detailed enough for us to assist you. Post the results from the Scite output window. You could also add some error checking to the code. Since this button has an ID, what if you do:#include <IE.au3> Local $oIE = _IECreate("http://yourpage.com") Local $oDiv = _IEGetObjById($oIE, "sell_at_market") _IEAction($oDiv, "click")Because, in your script, you're trying to get an object which name="sell_at_market", but this is not the case of the button (its id="sell_at_market", and it has no name).in Scite output error like this :--> IE.au3 T3.0-1 Error from function _IEAction(click), $_IESTATUS_InvalidDataTypen the script do nothing. Edited July 10, 2015 by Tripoz Link to comment Share on other sites More sharing options...
Jefrey Posted July 10, 2015 Share Posted July 10, 2015 (edited) How 'bout this? There are many ways to do it.#include <IE.au3> $oIE = _IECreate("http://yourpagehere.com") $oButtons = _IETagNameGetCollection($oIE, "button") For $oButton In $oBurrons if $oButton.id= "sell_at_market" Then $oButton.Click ExitLoop Next Edited July 10, 2015 by Jefrey My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
Danp2 Posted July 11, 2015 Share Posted July 11, 2015 --> IE.au3 T3.0-1 Error from function _IEAction(click), $_IESTATUS_InvalidDataTypeThat can't be the only error. Post the complete contents of the Output window. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
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