Hi Community,
pls. help .... I want to automate the entry of the currentDate - how can I get the currentDate and how to set it then?
I am not firm with programming - pls. explain in a simply way - but I learn fast
thx
Hannes
How to set the "CurrentDate"
How to set the "CurrentDate"
You do not have the required permissions to view the files attached to this post.
Re: How to set the "CurrentDate"
Hi,
At first, please post a Ranorex snapshot (instead of screenshot) of given date element. Screenshot is not helpful for evaluation of element's capabilities and available attributes.
Generally speaking, you must create a recording variable, which you need to fill with current date, obtained, for example, by code like this:
Then you can fill the input element by SetValue or KeySequence action.
At first, please post a Ranorex snapshot (instead of screenshot) of given date element. Screenshot is not helpful for evaluation of element's capabilities and available attributes.
Generally speaking, you must create a recording variable, which you need to fill with current date, obtained, for example, by code like this:
Code: Select all
string curDate= System.DateTime.Now.ToString("DD.MM.yyyy");
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: How to set the "CurrentDate"
Hi Pavel,
enclosed pls find the snapshot...
I created a user code module but the systems want´s to bound to a data column? How to do this
many thx
enclosed pls find the snapshot...
I created a user code module but the systems want´s to bound to a data column? How to do this
many thx
You do not have the required permissions to view the files attached to this post.
Re: How to set the "CurrentDate"
Hi,
You mention code module, but the screenshot you posted, looks like UserCode file, which is a part of Recording module?
In case of recording module, you can define module variable, via 'Variables' button or "as new variable" context menu.
In pure Code module, however, you need to right click in code module (under empty constructor) and select "Insert new module variable…"
In both cases, once the module variable is defined, you don't have to create a new string variable in code, but simply use the one you just created at module level.
You mention code module, but the screenshot you posted, looks like UserCode file, which is a part of Recording module?
In case of recording module, you can define module variable, via 'Variables' button or "as new variable" context menu.
In pure Code module, however, you need to right click in code module (under empty constructor) and select "Insert new module variable…"
In both cases, once the module variable is defined, you don't have to create a new string variable in code, but simply use the one you just created at module level.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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