I'm working on a framework that allows me to log into the various components of my app multiple times as different users. Our app has different web site apps with different functionality. So I can log into web site 1 as user 1, web site 2 as user 2, etc... Each launches a browser window (I've disabled tabs). I've currently limited it to allowing 2 different logins per site, and there are 4 different sites, so I can have up to 8 different browser windows open.
Here's the problem: When I log in with only 1, 2 or 3 browsers, no matter which sites (I've tried different combos) everything is working fine. However, when I have 4 or more I start running into issues with being unable to find the elements.
So for example say I've logged into all 4 sites once (and have 4 different browser windows). Now that all the launching has been done, I want to click the log out button on one of the browsers. I've got code similar to this in a class/procedure to handle clicking buttons (I left out a bunch of code):
Public Function Click(sRxPath as string, oParent as Ranorex.Core.Element) Dim MyControl as Ranorex.Unknown = Nothing Try MyControl = oParent.FindSingle(sRxPath, 30) MyControl.EnsureVisible MyControl.Click Return True Catch e as exception debug.print(e.message) Return False End Try End FunctionWhen I call this function, I'll pass something like this:
SessionControls.Click(".//td[@id='lnkLogoff']", oBrowserWebDoc1)And oBrowserWebDoc1 is the Web Document that contains this log off button for one of the web sites.
So, when I run 1, 2 or 3 browsers at the same time, this code works fine and everything works when I want to log out. However, when I launch more browsers and call the same function, it cannot find the button. I thought maybe it was just not finding it within the 30 seconds I've allocated, so I jacked it up and that didn't help.
Any thoughts? I'm using 3.0.3.
Aracknid