How to test and verify a screen that\'s going to change during the test?
I'm a rookie at SilkTest. I've been testing a web app, a portal, which has a user login and the user can create his own content. I'm getting to the part of the scripting where the tests involve telling the app to add or delete pages, and add or delete content of those pages and change the order of the pages (tabbed for selection), etc. So everything I need to test involves changing the screen. I'm trying to figure how to design tests with verifications, if the window declarations in my frame.inc file are going to get squiddled around as the scripts run. In exploring the question, I ran "Run Window Declarations" and hovered the mouse over a list of three page names in the popup window that manages deleting and order changing. There's an icon next to each name in the list, that you click to delete that page. I could see the tags as Page 1 -- HtmlText #8, Page 2 -- HtmlText #9, and Page 3 -- HtmlText #10. After deleting Page 2, the window refreshes itself and the list is now Page 1 -- HtmlText #8, Page 3 -- HtmlText #9. How can I use "Page3" as an identifier if its tag is going to change on the fly? Won't Silk slip on the banana peel?
I haven't fooled around with scripting it yet, this is the point I was at when I had to leave work and I puzzled about it on the way home and now I'm hoping to get some tips before I go off this morning.
I thought that I might call the objects in some "raw" way, like HtmlLink#9.Click() and Verify(HtmlText#10.Exists(), FALSE). I also thought there might be some, way using the GetContents() function, to get the contents at any moment, and scan through it looking for the new tag assignments each time and sort of "reidentifying" my objects based on something in there. I suppose some sort of utility functions could be written that would do that for me.
I don't know if I'm clear here, this is groping in the dark for me.
Re: How to test and verify a screen that\'s going to change during the test?
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by felecha: How can I use "Page3" as an identifier if its tag is going to change on the fly? Won't Silk slip on the banana peel? <HR></BLOCKQUOTE>
Don't use an identifier.
You should be able to call your pages dynamically.
I could select a tab in my java app by doing the following: