How to add a value to another value read from onscreen
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to add a value to another value read from onscreen
I have an object value (Quantity) and I need to increment it by 10.
I used 'Set variable value' method to read the onscreen object value to a variable. but I am not able to increment it with a desired value and make an entry on screen.
Requesting your help to resolve this issue.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Without knowing anything about your tested application and control you are working with, I may suggest something like this:
var aValue = obj.Quantity.Value;
aValue = aqConvert.VarToStr(aqConvert.varToInt(iValue) + 10);
obj.Quantity.Keys(aValue);
/Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the solution. I did work to a great extent and I have captured the value from the application, converted to Int and added another value 10 to it.
Log message display is working fine.
However, I am not able to write this value into the field in the application.
Note: Mine is a Keyword testing approach.
Could you please advise if there are any special methods to be used to write the script output into the field?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> if there are any special methods to be used to write the script output into the field?
.Keys() method for scripting.
Use On-Screen Action operation for Keyword test and configure it to call Keys method.
/Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Express gratitude toward, I want to do it, yet it requires some serious energy, thank you for sharing valuable data. Thanks for the info i will try to figure it out for more
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice Post !! I like it, it also comprises a lot of useful facts. Advantageously, this is really the best on this notable topic. I harmonize with your conclusions and will thirstily look forward to your approaching updates. In my opinion, this post is really the great one! Thank you for this post, I am mainly surprised by the way your content is unique and almost every single little detail. we can do the manipulations for the screen fields by keeping loop at the screen.
ex.:
Loop at SCREEN.
endloop.
and to do manipulations based on the field name we can use "screen-field."
ex:
loop at SCREEN.
if screen-field = kna1-kunnr
" the required code"
endif.
endloop.
