05-31-2013 07:18 AM
Go to google.com and add any object on the page to your local repository. Rename the browser object to "browser" and google's page to "Google".
Run the following code:
systemutil.Run "iexplore.exe", "http://google.com/"
Set objDesc = Description.Create
objDesc.Add "xpath", "//a"
Set links = Browser("Browser").Page("Google").ChildObjects(obj
I get 36 links total on the page, which is correct. Now change "//a" to "//span". This should now get you a count of all spans. Run the code again. I get 0, which is not correct. I double checked using a plugin called firepath for firebug in firefox that there are indeed spans on googles homepage (44 to be exact). So far, working types are:
Tags that don't work:
Anyone know what the deal is? I am using QTP 11 build 1018 with IE 9.