Azevedo Posted October 25, 2013 Share Posted October 25, 2013 Hi, I'm using ControlClick() to click on Firefox window according to the window title. It works at first but after a couple loops it won't find the window by title anymore. The window title change on page reload but it will be back to original title. Opt("WinTitleMatchMode", 2) Opt("MouseCoordMode", 0) $main_title = "my page title" $ymouse = 100 Do ; click refresh ControlClick($main_title, "", 0, "left", 1 , 428 , $ymouse ) Sleep(5000) ; click print ControlClick($main_title, "", 0, "left", 1 , 1244 , $ymouse ) sleep(60000) Until (0) Link to comment Share on other sites More sharing options...
Danp2 Posted October 25, 2013 Share Posted October 25, 2013 There is a UDF that can be used in conjunction with Mozrepl to automate Firefox. Have you looked into that? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
jdelaney Posted October 25, 2013 Share Posted October 25, 2013 (edited) use the ff.au3, but for a quick fix, do this...handles don't change, title may: $main_title = "my page title" $hwnd = WinGetHandle($main_title) $ymouse = 100 Do ; click refresh ControlClick($hwnd, "", 0, "left", 1 , 428 , $ymouse ) Sleep(5000) ; click print ControlClick($hwnd, "", 0, "left", 1 , 1244 , $ymouse ) sleep(60000) Until (0) this assumes a few things: 1) your window is already open at beginning of the script 2) you always want to perform the click on the same window (found in number 1) If you open/close windows, this will not work. Edited October 25, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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