| || |
I want to be able to conditional use different window declarations from the same testframe include file, but I want the declaration Identifiers to be the same name.
Here is my problem:
I have a link that appears as HTMLHEADING on Netscape and HTMLLINK in IE. The TAGS are the same.
I do not want to change my code, but rather use a different window declaration during script execution.
Can I have one test frame .inc that contains two window declarations that have the same Identifier MySite. One would have HTMLHEADING RegisterLink and the other will have HTMLLINK RegisterLink.
I want to be able to switch during execution depending on the current browser.
do I have to have two seperate include files and switch at runtime? I tried this, but I was having trouble doing this without writing a function that would be called before every testcase execution.
Any help would be great.
Re: conditional testframe.inc?
I had the same problem for a lot of our links.
What I did was extend the HtmlLink Click() method so that it if the link didn't exist, but a control with the same name + "Heading" existed, click that.
derived :: Click(iButton, iXpos, iYpos)
LogError ("Link/Heading does not exist")
LogError ("Link does not exist")
Then all I have to do is make sure I declare both MyLink and MyLinkHeading for any link that exhibits this behavior.
It's not pretty but until Segue fixes netscape.inc to recognize this stuff better, not sure what else can be done.
By the way, I don't know if this was discussed anywhere before on this forum, but I can't extend Html* methods if I reference my class methods include file in the Use Path in runtime options. I have to put a use statement in my scripts. Kinda weird, but I guess I can live with it if that's the way it's gotta be.