Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get ChildObjects to register table?
#1
Not Solved
Hello,

I have a webpage that ask you to select coke type, pepsi type, generic type, or none.

Selecting coke sends you to 1 yes or no question followed by an okay before hitting the results page which displays a data table.
Selecting pepsi sends you to 2 yes or no questions before hitting the results page which displays a data table.
Selecting generic or none just goes to the results page which displays a data table immediately.

Selections coke sprite -> yes -> yes leads to no results returned, but all the others returns a table. The automated script runs through all 4 options I am able to run the following just fine:

Quote:1. Generic Sam's Choice, None Coffee, None Water, Generic Big K's
2. Coke Sprite, Coke Coke, Pepsi Mtn Dew, Coke Fanta

But if I throw in:

Quote:3. None Coffee, Coke Sprite, None Water, Coke Coke

the following code insists that countOfTables for test case 3 is zero, even though the table displaying just fine and it is even able to click a button on the table itself.

Code:
Set ODescO = Description.Create()
ODescO("html tag").Value = "TABLE"
ODescO("class").Value  = "resultsBTable"
Set OchildO = Browser("Beverage").Page("Beverage - Beverage Page_2").WebTable("a table").ChildObjects(ODescO)

countOfTables = OchildO.Count

Test Case 3's None Water's table is claimed by the above that the table is not there even though there are 5 columns worth of information being displayed and a look via View Source shows that the table is displaying.

Any test cases thrown before or after test case 3 runs just fine as long as there is Not any combination where Coke type follows a None type or a Generic type which is followed by a Coke type as those would do the same thing as test case 3.

I've tried:

Code:
Browser("Beverage").Refresh

and I've noticed that the problem types will sometimes display a message saying

Quote:"To display the webpage again, Internet Explore needs to resent the information you've previously submitted.

If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again."

Each type is tested one at a time so that coke type -> yes would be tested first then coke type -> no, then none type, coke type -> yes, etc. so each is independent from each other aside from being on the same list.

How can I get OChildO.Count to actually be the number of tables being displayed?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help in creating dynamic object string using Childobjects Keshub Mathur 0 1,597 09-11-2017, 05:52 PM
Last Post: Keshub Mathur
  childObjects not working sometimes hadar 0 1,866 07-30-2013, 12:04 AM
Last Post: hadar
  problem with childObjects hadar 7 7,135 04-02-2012, 12:56 PM
Last Post: sshukla12
  Can I register/use a vbs-VBS .dll with QTP? myarbro 3 3,083 07-01-2009, 06:20 AM
Last Post: Anshoo Arora
Question "Or" (|) does not work in Regex, using childObjects?? ConstantChange 0 2,275 10-08-2008, 10:40 PM
Last Post: ConstantChange

Forum Jump:


Users browsing this thread: 1 Guest(s)