How to compare the local variable with text in Clipbaord?

Ranorex Spy, Recorder, and Studio.
dontbeshy
Posts: 9
Joined: Sun Sep 11, 2016 5:39 am

How to compare the local variable with text in Clipbaord?

Post by dontbeshy » Tue Sep 13, 2016 6:28 am

I made two recording - one is to extract the sales amount from web page and one is to extract the sales amount from Putty.

Using "Get Value" action, I got the sales amount in varAmount.
Using the recording, I got text containing the sales amount on Putty window in Clipboard.

I am not sure when/where I add codes to compare varAmount with text in Clipboard.
How to fire a method that compares this variable with text?

I saw the sample code for Clipboard and I added "User Code" action with the method,

public void Validate_ClipboardContentEqual(string compareText, string customLogMessage)

But when I clicked "Param" button, "Bound Variable" field doesn't show "varAmount" which is showing in [Variable] window.

So I am not sure how to bind varAmount with this method.


Anyone has an idea?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to compare the local variable with text in Clipbaord?

Post by odklizec » Tue Sep 13, 2016 8:19 am

Hi,

I would suggest you to examine this blog post, about sharing data between modules...
http://www.ranorex.com/blog/sharing-dat ... o-another/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration