Open a browser. Now open a new tab.
Have TestComplete go from on tab's page to the other.
I've been through the help and these forums.
I cannot find a way to simply help me /go to/select/ one of the tabs in a browser.
I've tried record and playback.
i.e. Open a browser with two tabs and toggle between them.
I've also tried toURL and the page that opens the 'new tab' is changed to the url.
Ugh: Can't get there from here.
Looked at Focus too.
An hint would be nice.
Meanwhile, back to researching /Page/Window/Browser properties.
A little 'reason' as to why this needs to be done.
Our product starts in a browser but then opens a second browser tab.
As we do work in "Tab 1", it is updated in "Tab 2".
I thought that switching from tab to tab would be an easy thing to do.
I'm now checking out "TestComplete On Demand Video Training" which might
hold a clue.
(From Dorkness Rising. Of course)
OK I got it and surprised that there are not more tab controls features. (tabContent and tabDescription)
I'm guessing you just don't need them.
So what I found was to simply use Object Spy.
That gave me the complete tab object.
I then assigned the object to a variable and viola, I can now 'do what i need to do'.
By assigning multiple objects to variable's tabs, I can then swing back and forth: easy peasy.
I was thrown because this object has no tagName so you cannot use,
It would be nice to be able to 'find' this object with some method though.
I put a list of objects on a page I want to find into an array then go through a loop to locate them.
With multiple tabs, I could do the same.
So, is this how you guys do this?
myWindow = Sys.Browser(Project.Variables.browserType);
itemTabBtn = myWindow.BrowserWindow(0).CommandBar.TabBand.TabBu tton("Work With Items Tab Group 3") //i put that string into another variable btw
if (!itemTabBtn .Exists)
Log.Error("Could not find the Item Tab Button");
OK Still not working well.
First, as you can see in my previous example, the tab has the definition of "Work with Items Tab Group 3". This will increment each time the test will run.
But here is the real kicker and what I cannot solve.
Using IE 10.
I have a single browser session on page "http://serverOne/tw1/wsadmin/wsAdminHome.aspx"
Next the application opens a new tab "http://ServerOne/tw1/ItemEditor/ibeWwItems.aspx"
I am surprised at the outcome of this code segment.
curURL is "http://serverOne/tw1/wsadmin/wsAdminHome.aspx"
Yet the second tab ""http://ServerOne/tw1/ItemEditor/ibeWwItems.aspx" is the one that is foreground and focused.
So I tried a lot of things but it seems that TC is always focused on the first tab.
I tried to 'force TC's Page object to see the second tab with this:
But no go.
curURL = myWindow.Page("*").URL;
curURL still equals "http://serverOne/tw1/wsadmin/wsAdminHome.aspx"
Anyone have any helpful ideas?
Thanks in advance