Problem identifying text headings on a website?
Posted: Fri Aug 14, 2015 11:09 am
[Ranorex 5.4, Windows 7, testing a website on Google Chrome 44.0.2...]
I have a series of recorded modules, each for a product page on an eCommerce website. Each individual product page has the brand name as a <h1> heading. When recording, a click on the brand name heading text, gives it the xPath of a generic heading, ending with "/div[1]//h1[@tagname='h1']". Next when the recording is run, without refreshing or making any other change to the product page, Ranorex can't identify the item with the generic heading XPath and the test fails.
When I open Spy and track the brand heading text, it is given its own unique XPath with the brand name as innertext. The XPath ends with "/?/?/h1[@innertext='BrandName']" However, when I drag the element from Spy to the project repository, the Generic Heading repository is highlighted in the repository and no new item is created with the XPath from Spy.
Why is it that when I record a simple click action on a <h1> brand name heading and then immediately run the action step in Ranorex, Ranorex can't find the item on the web page?
Why is it that I can't drag the item from Spy to the repository, to create a new item?
Thanks!
I have a series of recorded modules, each for a product page on an eCommerce website. Each individual product page has the brand name as a <h1> heading. When recording, a click on the brand name heading text, gives it the xPath of a generic heading, ending with "/div[1]//h1[@tagname='h1']". Next when the recording is run, without refreshing or making any other change to the product page, Ranorex can't identify the item with the generic heading XPath and the test fails.
When I open Spy and track the brand heading text, it is given its own unique XPath with the brand name as innertext. The XPath ends with "/?/?/h1[@innertext='BrandName']" However, when I drag the element from Spy to the project repository, the Generic Heading repository is highlighted in the repository and no new item is created with the XPath from Spy.
Why is it that when I record a simple click action on a <h1> brand name heading and then immediately run the action step in Ranorex, Ranorex can't find the item on the web page?
Why is it that I can't drag the item from Spy to the repository, to create a new item?
Thanks!