Forum Discussion

jsmiley's avatar
jsmiley
Occasional Contributor
14 years ago

Can't compare a variable to an onscreen object

So, I am trying to say following in a checkpoint but am getting a type mismatch error:




  1. Load page 1

  2. Set variable to onscreen object inner text property

  3. Load page 2

  4. Variable contains value of an onscreen object inner text property <--- Error occurs here.



Anyone have any ideas on how to get this checkpoint to work?



The Checkpoint code in question is as follows (using the GUI):



Variables.Grouping, "innerText", 6, Sys.Process("iexplore", 2).Page("*").... blah blah blah .... .TextNode("Category_Title").innerText, false





The "blah blah blah" part is the tree structure of the site and isn't really needed here to make my point.

4 Replies

  • jsmiley's avatar
    jsmiley
    Occasional Contributor
    Forgot to mention that Variable.Grouping is a String variable.
  • jsmiley's avatar
    jsmiley
    Occasional Contributor
    Thanks, I actually noticed this, however, the problem I am having now is that I cannot store an on page object from a previous page.



    Any ideas?

  • Hi,





    I'm not sure I understand your description of the new issue correctly. If you are talking about the impossibility to access elements of a page that was displayed during a test, TC expectedly cannot access objects that do not exist. Otherwise, describe the problem more specifically and provide some images that demonstrate it.