Forum Discussion
Hi,
> Set oBrowser = Sys.Browser("*")
> Set oPage = oBrowser.Page("*")
On the human language the first line means this: "Search for any browser running in the system and use the found one from this point on".
The second line means this: "Using the browser found on the previous step, get any page opened in it and use this page from this point on".
Considering the above, I hope that it is obvious that some other but not expected browser and page can be found and used when more than one browser with more then one page are open in the system.
You need to provide exact identification criteria to command TestComplete to search for and use the object that you need for your test.
- saleem19905 years agoNew ContributorHi Alex,
Thanks for reply. Your correct
Is there any way without using below lines .
So that I can test multiple browser page validation
Set oBrowser = Sys.Browser("*")
Set oPage = oBrowser.Page("*")- AlexKaras5 years agoChampion Level 3
Hi,
> Is there any way without using below lines .
Not sure I got the question...
In order for the tool to be able to work with browser and web page they must be somehow specified. The way of specification depends on the tool. As you said, for UFT it is possible to use some property that specifies when the given programmatic object was created.
TestComplete tries to mimic human user as much as possible. Thus the preferred way of addressing objects for TestComplete is to use those properties that the human end user works with.
Consider the following manual scenario: I started this test and proceeded to the point where I have two pages opened in the browser. Then I had to switch to do something else and asked you to continue the test.
Will you deal with creationtime? I bet no. You just will have nothing like that. Will you be able to identify the browser to use, the initial page and second spawned one? I am pretty sure that yes. How will you be able to identify them? Consider how you will do this manually and implement the same logic/identification attributes in your automated code.
- TanyaYatskovska5 years agoSmartBear Alumni (Retired)
Related Content
- 2 years ago
Recent Discussions
- 13 hours ago
- 2 days ago