sambadamerla Posted November 1, 2012 Share Posted November 1, 2012 Hi, While I am running my automation scripts using Selenium2.0 I am getting firefox Unresponsive script errors. So I am using below AutoIt script which should run on my system (in infinate loop) and check if any popup availble it should click on Continue. But the below script is not able to click the coninue button. However if I use send("{Enter"}) its clicking stop button (as by default the cursor is on stop button). I need to click on Continue button only ;Local $Max = 0 While 1 If WinExists("Warning: Unresponsive script") Then WinActivate("Warning: Unresponsive script") Sleep(2000) Get ControlClick("Warning: Unresponsive script", "", "Continue") ;ControlClick("Warning: Unresponsive script", "", "[CLASS:Button; TEXT:Continue]") Sleep(2000) EndIf ; $Max = $Max + 1 Sleep(2000) ;If $Max > 20 Then Exit(1) WEnd Link to comment Share on other sites More sharing options...
Rogue5099 Posted November 1, 2012 Share Posted November 1, 2012 You could just change the settings of Firefox to allow larger scripts. My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
sambadamerla Posted November 1, 2012 Author Share Posted November 1, 2012 We already added the below code to my Webdriver object and its not working FirefoxProfile firefoxProfile = new FirefoxProfile(new File(IConstants.FIREFOX_PROFILE)); firefoxProfile.setPreference("dom.max_chrome_script_run_time", 4400); firefoxProfile.setPreference("dom.max_script_run_time", 3400 ); dc.setCapability(FirefoxDriver.PROFILE, firefoxProfile.toJson()); Link to comment Share on other sites More sharing options...
Danp2 Posted November 2, 2012 Share Posted November 2, 2012 Couple of thoughts: 1) Have you tried sending {Tab}{Enter} to switch to the desired button? 2) You might want to look into the FF.au3 UDFs to see if they will help you here. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
sambadamerla Posted November 2, 2012 Author Share Posted November 2, 2012 Thanks DanP2 I already used send{tab}{Enter} and it is working fine. However I thing it will be more relable if I click depen on the button name (text on the button). I will check with FF.au3. Regards Samba Damerla 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