olosunsira12
4 years agoOccasional Contributor
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)