Contributions
Re: The requested resource is in use
Hi basically I loop multiple time through a login on a web page to test performance and stability of the code that I have written. I had so much stability issue with the test pc because of the 2 explorer 32 and 64 bit. Right now I am not at work. (Working from home) And the problem is not reproduced on this laptop. Only on the test machine had this issue. It could happen once out of 30. Sometime not. So... I am trying to understand how to make stable code. And right now that is the onlystick in the wheel of the machine! ;-) I am getting there! :-) def t(): IP = "10.37.85.12" Log.Message("iCAdminLogin to " + IP) #Login.navigateToPage(IP) Browsers.Item[btIExplorer].Navigate("http://" + IP + "/",10000) propStr = ["Visible", "VisibleOnScreen", "URL"] valueStr = [True, True, "http://" + IP + "/"] #Find Current page while not Sys.Browser("iexplore").Find(propStr, valueStr,60,True).Exists: Log.Warning("Login Page was not ready") aqUtils.Delay(100) Login.clickLogin() Login.setLoginUserName() Login.setLoginPassword() #Verify if login is a success result = Login.verifyLoginStatus() #Logout propStr = ["namePropStr", "Visible", "VisibleOnScreen", "ObjectType"] valueStr = ["logout.jsp", True, True, "Link"] adminPageLogoutObj = Sys.Browser("iexplore").Find(propStr, valueStr,60,True) adminPageLogoutObj.Click() Log.Message("Login result: " + str(result)) return result def t2(): while True: t()1.3KViews0likes0Comments- 1.3KViews0likes2Comments
Re: Scripts does not execute properly on another PC with internet explorer 11: Need to remove IE 32 bit
Hey, Thanks for the tips. I will now use findEx Iam using a while notExists with timeout to wait for the object. But it is a bitcumbersome just to do little thing. And I dont want to stop the script when there is an error. def verifyLoginStatus(): Log.Enabled = False propStr = ["namePropStr", "Visible", "VisibleOnScreen", "ObjectType"] valueStr = ["logout.jsp", True, True, "Link"] timeout = time.time() + 60 # 1 minute timeout while not Sys.Browser("iexplore").Find(propStr, valueStr,60,True).Exists: if time.time() > timeout: Log.Error("verifyLoginSuccess() Timeout: {:+.2f} seconds".format(time.time() - timeout).format()) return FAIL Log.Warning("Logout link is not ready") aqUtils.Delay(500) adminPageLogoutObj = Sys.Browser("iexplore").Find(propStr, valueStr,60,True) result = aqObject.CheckProperty(adminPageLogoutObj, "contentText", cmpEqual, "Logout") Log.Enabled = True return result925Views0likes0CommentsRe: Scripts does not execute properly on another PC with internet explorer 11: Need to remove IE 32 bit
Hi all, I have found a good workaround. Each object that I access on the web page I do a find. And this solve my issue of the page index. propStr = ["namePropStr", "Visible", "VisibleOnScreen", "ObjectType"] valueStr = ["logout.jsp", True, True, "Link"] adminPageLogoutObj = Sys.Browser("iexplore").Find(propStr, valueStr,60,True) adminPageLogoutObj.Click() This way I dont have to manage IPs, page names or indexes and the code is more robust but need to write more lines. I would of like to deactivate the 32 bits version of iexplore.exe but this will suffice. Thanks for your help. Stéphane.2KViews0likes2CommentsRe: Scripts does not execute properly on another PC with internet explorer 11: Need to remove IE 32 bit
Well, using navigate to change the URL is not opening a page! I dont see multiple page on the monitor. SO the script must be right. Unless I dont understand the process. and further more without scripting just observing the object with the object browser. Navigating manually with the mouse. visiting a page 2 times will create the index on any visited pages on that pc only with 2 IExplorer 32 and 64 bit. Object browser is showing only one process with one page but with an index which is strange because there is only one page. And this index This is what I do in my sample script. And it is working very well in the first PC. But when I execute in the other one with 2 internet explorer, 1 32 and one 64 bit. that where I get the index of 1 that make the script working strange. I would like to eliminate the obvious extra 32 bit explorer.1.6KViews0likes3CommentsRe: Scripts does not execute properly on another PC with internet explorer 11: Need to remove IE 32 bit
I did not see any physical tab added. But true opening and closing sure seems to resolve the issues. But I dont want to close browser each time I want to change web page Will have to investigate more. But sure I would like to have the 32 bit version gone!1.6KViews0likes5Comments