jeudi 13 avril 2017

Find the string value of a siteprism element's locator at run time

I have a situation where some siteprism elements that are working on chrome are not working on IE, mainly these are elements that are either not visible or read-only. however I am able to use javascript locators to get what I need in this case.

so where:

element :some-element-name, :id,"some-element"
page.some-element-name.text

throws an element not found error

this returns the value I need:

evaluate_script("document.getElementById('some-element').text")

What I would like to do...is something like:

evaluate_script("document.getElementById(#{some-element-name.locator_as_string}).text")

What I can't find is: how do I get the value of a siteprism locator as string?

Aucun commentaire:

Enregistrer un commentaire