Capturing dinamic values
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Capturing dinamic values
Hello!!
I have this web object:
Aliases.browser.pageSearchresultsEs.FindElement("//h1[contains(text(), 'Málaga: 413 alojamientos encontrados')]").ContentText
Every time I run the test case the web object changes .(ex: now is Aliases.browser.pageSearchresultsEs.FindElement("//h1[contains(text(), 'Málaga: 413 alojamientos encontrados')]").ContentText but next time could be Aliases.browser.pageSearchresultsEs.FindElement("//h1[contains(text(), 'Málaga: 410 alojamientos encontrados')]").ContentText
Is there a way to capture the number dinamically?
I need to show the result so I'm using this:
BuiltIn.ShowMessage(Aliases.browser.pageSearchresultsEs.FindElement("//h1[contains(text(), 'Málaga: 413 alojamientos encontrados')]").ContentText)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is that the only header on the page? Also what if you change the string it's looking for to just "alojamientos encontrados" so it's ignoring the number altogether?
--------------------
Senior SQA Automation Engineer
