Arclite86 Posted September 19, 2014 Share Posted September 19, 2014 (edited) I know this is a basic question but im trying to focus on a firefox window with WinActivate and WinGetHandle The url = http://tweepi.com/tools/flush#0 the tabname = Flush the Twitter users that do not follow you back :: Tweepi but somehow Im doing something wrong because after the function I give the browser window a command and it give me an error that it didn'' found the browser window So I would really like to know how I focus this window In the right way. Edited September 19, 2014 by Arclite86 Link to comment Share on other sites More sharing options...
Danp2 Posted September 19, 2014 Share Posted September 19, 2014 Your question in vague. Please explain why you are using WinActivate / WinGetHandle instead of one of the commands from FF.au3. Also, what additional commands are you sending to the browser? Be specific. Post some example code that demonstrates the issues. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted September 19, 2014 Author Share Posted September 19, 2014 Well its actually pretty simple When I go from page to page I use _FFOpenURL("http://website.com/example") it suddently loses focus and after that all commants will give errors If somebody could help me with something like: If error that "focus on firefox window" but I dont know how I can do this in the correct way Link to comment Share on other sites More sharing options...
Danp2 Posted September 19, 2014 Share Posted September 19, 2014 If it was simple, you would have already come up with a solution. If you want help, post a working script that: 1) demonstrates the issues you are having, and ; 2) uses a publicly available website (not Tweepi) so that others can run actually run the code. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted September 19, 2014 Author Share Posted September 19, 2014 This is an example when it loses it focused (Tweepi is the only website I use) _FFOpenURL("http://tweepi.com/tools/flush#480") _FFLoadWait() $oButton2 = _FFXPath("//input [@id='button78']") _FFClick($oButton2) _FFLoadWait() Sleep(2000) _FFOpenURL("http://tweepi.com/tools/flush#500") _FFLoadWait() $oButton2 = _FFXPath("//input [@id='button78']") _FFClick($oButton2) _FFLoadWait() its very hard to track and see where the problem is because 9 out of 10 it works fine but something it just loses it focus its very weird so thats why I thought of using a code like If error that "focus on firefox window" Link to comment Share on other sites More sharing options...
Bert Posted September 19, 2014 Share Posted September 19, 2014 Are you doing anything while this script runs? Clicking on another window? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Arclite86 Posted September 20, 2014 Author Share Posted September 20, 2014 Are you doing anything while this script runs? Clicking on another window? yes is do sometimes I use google chrome at the same time, could that effect it? and how can I prevent I cant I use chrome at the same time? Link to comment Share on other sites More sharing options...
Bert Posted September 20, 2014 Share Posted September 20, 2014 yes it could affect it. try testing that. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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