-2

I have a selenium script which creates a financial profile on a financial web application. Now i need to check whether added financial stuff appears in the profile.

For example i added a Retirement account to the profile and want to see if added retirement account appears in the profile. I have checked UI elements to verify that it appears in the profile. But i am wondering if there is a way to check same using javascript variables.

I found javascript executor function that can be used in Selenium but i am not sure how to check which variable or function to check for a particular account(Retirement).

I also read about some extensions that can show you java script variables called real time but have had no luck with using those efficiently.

Any help would be appreciated and an example small code would be very helpful. Thanks!

1

1 Answer 1

1

This seems like a duplicate question. But if executeScript doesn't return the variable to whichever language you are running Selenium in, then you can always dump the contents of the object to a DOM element and use Selenium to inspect it there.

Sign up to request clarification or add additional context in comments.

3 Comments

my question also include- how to check what javascript function and variable can be used to verify added value. I need a direction to look on how to see all javascript functions and variables in real time
I don't really know what you mean by "show you java script variables called real time." As far as I know there is now event in JS which one can hook to show executing code. If you're trying to determine which functions are called and which objects are touched during execution, perhaps you could try using the developer tools in Chrome or your favorite browser and tracing the event from there. That should give you enough information on what to check in your Selenium script.
I have been trying developer tools to see which function and object are touched while execution but somehow i am not getting a good answer. My web app is built in ember js. I am reading how to use firebug to check my javascript functions . Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.