Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 520 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting the current page in TestComplete

#1
I am writing a Script for TestComplete using JScript.
According to the documentation I can get the current page using the line:

page = browser.Page("*");

But instead I get a message: waiting for "\*" and after that an error that the page "\*" was not found.
Maybe I got something wrong there. What I am looking for is a method that gives me the Page Object for the current page I am on. Can anyone help me and tell me if such a method exists.
I want to avoid using NameMapping because in there the objects are fixed in their containers. In the project I test these containers may change so I use xpath recognition all the way through.
Reply

#2
The code you specified should work if:

1. The **browser** variable contains a reference to a specific browser (e.g. *Sys.Browser("firefox")*).
2. The **browser** variable is the current browser (*Sys.Browser()*) and the current browser is set. The current browser is set when you call the Run or Navigate method of a browser object (e.g. *Browsers.Item("firefox").Run();*).
3. You have a page opened in the current browser.
4. The browser version is supported. Make sure that you have the latest version of TestComplete (11.11 by the moment) to be sure that your browser is supported.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through