WaitChild does not appear to recognise when a Link object appears in a webpage
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2010
04:39 AM
06-04-2010
04:39 AM
WaitChild does not appear to recognise when a Link object appears in a webpage
I cannot get WaitChild to work for a logout Link which only appears after user has logged in:
Set logoutLink = Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).Panel(1).WaitChild("Link(2)", 1000)
If I insert a sleep(100) before the line of code above it works, but that defeats the object of trying to use the WaitChild method
Set logoutLink = Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).Panel(1).WaitChild("Link(2)", 1000)
If I insert a sleep(100) before the line of code above it works, but that defeats the object of trying to use the WaitChild method
4 REPLIES 4
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2010
04:50 AM
06-04-2010
04:50 AM
The problem may not be in the wait child for the link, but in the panel that the link is a child of. Something to look at is whether or not that panel exists prior to logging in.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2010
04:57 AM
06-04-2010
04:57 AM
Thanks for your response.
I did think of that, so tried running this code:
Set
logoutLink =
Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).WaitChild("Panel(1)",
1000)
Set
logoutLink =
Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).Panel(1).WaitChild("Link(2)",
1000)
However the code only fails on the second line (the new Link(2) object), so that does not appear to be the problem
I did think of that, so tried running this code:
Set
logoutLink =
Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).WaitChild("Panel(1)",
1000)
Set
logoutLink =
Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).Panel(1).WaitChild("Link(2)",
1000)
However the code only fails on the second line (the new Link(2) object), so that does not appear to be the problem
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2010
12:46 AM
06-07-2010
12:46 AM
Hi Jonathan,
Try using the 'WaitLink' method:
Set logoutLink = Sys.Process("iexplore").Page(uRL).Panel(0).Panel(0).Panel(1).WaitLink(2, 10000)
Please see the 'Additional Methods Used to Obtain Web Pages Elements' section of the Working With Web Page Elements help topic.
--
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2010
01:21 AM
06-07-2010
01:21 AM
Hi David,
Thanks for your response.
I had previously tried the WaitLink method but did not realise that I could specify my link using an index. Using the link name does not work, but using an index, as you suggest, did work. So thanks very much for your help!
Thanks for your response.
I had previously tried the WaitLink method but did not realise that I could specify my link using an index. Using the link name does not work, but using an index, as you suggest, did work. So thanks very much for your help!
