Contributions
Re: Dynamically updated DIV list
Thank you very much Jose. That worked. I have another similar problem and this same solution is not working there. Here is the issue. There is a link on the page and upon clicking, it open a small floating DIV which stays for few seconds and disaapears. This DIV contains a hyper link and some text. I need to click that link to get into the flow. But I am not able to get hold of that floating DIV. I tried the above solution but it is not working in this particular case. -Sunitha.1.1KViews0likes0CommentsDynamically updated DIV list
Hi All, I have a webpage with main portion of the screen occupied by a DIV element with horizontal rows of DIV sections inside it. Each DIV section contains a heading and some text in various DIV elements. When the page contains more than 25 DIV sections, there is a Show More button which adds 25 more DIV sections upon its click and also a scrollbar to the right of the outer DIV container. I am able to seach for the DIV section I am interested in for the test when the page contains less than 25 DIV sections or the one I am looking/searching for is in the first 25 sections. But when I have to click the "Show More" button, even if the section I am looking for is added to the bottom of the page (outside of the view), the same script is not able to find the DIV section. My search logic is simple. I look for all DIV elements with a certain className and I always get only 25 elements back in the call to FinadAllChildren on the Page object. It means the FindAllChildren is not able to fetch the 25 more DIV elements that are added by clicking "Show More" button. Can anyone help? -Sunitha.Solved2.1KViews0likes3CommentsRe: Scripting and Finding DIV Elements
I tried the xpath search too. The problem is that xpath is not working at all. Even the DIV items which I am able to find via Page.FindAllChildren method, I am not able to get the same using EvaluateXPath method. Not sure if there is any setting I need to make. One thing though is that when I do a view source on the page I dont see the DIV elements I am looking for in the html. Is that the reason? If Xpath works I feel that it is a better way to search for the elements because I can use search by partial text for prop values.2.2KViews0likes0CommentsBooks, Help or Training on TestComplete
Hello, I have some experience in QTP and now working on TestComplete.I am trying to find good documentation on web testing using TestComplete. Are there any good books or help I can find online or good online trining sites suggested? Sunitha.3.2KViews0likes2CommentsScripting and Finding DIV Elements
Hi, I am creating a simple test script to test a web page. After logging into the webapp, the page displays a list of DIV items and each DIV contains a hyperlink. And also some other text with some identifying numbers. Using the page.FindAllChildren method and passing className of the DIV plus the tagName as DIV, I am able to get an array of DIV objects. Now I loop thru and look for my particular DIV with the number I am looking for. The script finds it successfully. Now when I call Find method on the div object passing in the contentText and tagname properties, I am not able to find the hyperlink. I am able to see the properties in the Object Spy and cannot get the link via script. Please help!!! Below is the code after finding the particular DIV I am looking for. It always goes into the Else block below. hmap.Add "contentText", "Project Setup" hmap.Add "tagName", "A" hmap.Add "innerHTML", "Project Setup" hmap.Add "title", "Click to work on the task" keys = hmap.Keys values = hmap.Items Set PrjLink = myDiv.Find(keys, values, 100) If (PrjLink.Exists) Then Log.Message "link exists" PrjLink.Click Else Log.Message "link does not exist, " End If Sunitha.3.5KViews0likes8CommentsRe: How to resolve this error Window was destroyed during method execution'.??
Hi Alex, Thanks for the reply. You are right that the DIV list is dynalically updated with a "Show More" button. But the only previous object I use is the Page (web) object which I initialize at the beginning of the script via "Set pae = Sys.Browser(iexplore).Page("http://somesite.com/xyz/*")" I can re-initialize the page object reference and try.1.4KViews0likes0CommentsRe: How to resolve this error Window was destroyed during method execution'.??
Hi, I also keep getting this same error for several of my web page objects. But I noticed a pattern. On my web page there list of items and each item is a DIV. Each DIV contains few labels, links, icons etc. I have my VBScript function search for the particular DIV (item from the list). When trying to click a link inside that DIV, I get this error "The window with the handle 0x00000000 does not exist." it works sometimes but most of the times it thros this error. I tried to check if the object exists and it does exist. I also tried calling the Refesh method and still doesnt work. What could be the issue? Please help!! Here is the full error message. And yes it works when I test manually. The window with the handle 0x00000000 does not exist. Most likely, this error occurred because the tested object (window or control) or its parent object was deleted or recreated during the method call or before it. For instance, the window could be destroyed or recreated after you stored the object reference to a variable and before you called the object method through this variable. If the object is recreated, then to avoid the error, check the object's Exists property before calling the method, and if the object does not exist, obtain a reference to the new object. Sunitha Reddy.1.4KViews0likes0Comments