KeywordTests : web page : How to store dynamic value in the webpage and how do i call it ?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
KeywordTests : web page : How to store dynamic value in the webpage and how do i call it ?
Hi ,
Query :How to capture the dynamic value in the web page and store it in variable? So that i can search with this variable in the next webpage. Pl find the below screen shot
steps to reproduce :
1) Through KeywordTests recording, I have navigated to website and created a request. it has created a request number (dynamic) something like "Tempso-123'' as shown in the below screen shot
2) Now i need to login with different role and i need to search the above value(Tempso-123) and i need to be approve/reject request.
How to handle this scenarios ? can anyone please guide me
Thanks
Suresh
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. Create project Level variable
2.use Set Variable Value step (in Keyword Test)
3. Use Object Property and get Context Text. (select the Tempso-123 text area)
You can reuse this Variable anywhere in your project to fetch this value
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. I have followed your instructions and it is working as expected through keywordTests
I would like to do the same through JavaScripts : web page : How to store dynamic value in the webpage and how do i call it ?
Thanks
Suresh
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Suresh,
Script approach is exactly the same:
var strText = Aliases.Browser.Page.<Control>.wText;
Project.Variables.<YourVariable> = strText;
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
