こんにちは。
ドロップダウンに動的な日付を入れたいのですが、うまくいきません。
・試したこと
ドロップダウンのXpathを使用しています。
[@id=“root”]/div/div[3]/div/div[2]/div[1]/div/div[2]/div[1]/div[2]/div/button/text()
text()に{{Variables}}として動的な日付を入れようとしたら、失敗しました。
ちなみに、該当のドロップダウンはこれになります。
ここに昨日や一昨日などの動的な値を入れたいです!
なにか良い方法があれば教えていただけると幸いです。
The dates are the first of the last month and the end of the last month, respectively, in variables!
I want to assign from the variables.
The input date is
“2022/08/01”.
Hey!
First change the format of input date like this:
str_datetime = Datetime.ParseExact(Strinput.ToString, "MM-dd-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy/MM/dd")
Where: MM-dd-yyyy is your input date format (Change this format according to input date)
yyyy/MM/dd is your output format (No need to change anything here)
That’s why i asked you to provide the input date format…
Now pass the str_datetime variable in the aaname selector
Note: The selector will fail while validating but when we run this will work.
Try this and let me know
Regards,
NaNi
Yoichi
(Yoichi)
August 10, 2022, 5:00am
5
こんにちは
通常UiPathではXPathを使う必要性はほとんどありません。
単純に入力したいか所にTypeInto(文字入力)アクティビティで入力できないでしょうか?
TypeInto(文字入力)では全く反応しないんです・・。
あと、今気づいたのですが、僕がドロップダウンだと思ってたこの丸い部分は
ボタンでした・・。
おそらくカレンダーを選択すると値が入る仕様になっているっぽいのですが
これは先月1日から先月末日までの値を入れることはできるのでしょうか・・・?
N2027
August 10, 2022, 5:13am
8
当該部分、手動の操作であれば文字入力で日付の指定できますよね?
「文字入力」が困難であれば、Ctrl+Vでいけると思います。
Yoichi
(Yoichi)
August 10, 2022, 5:14am
9
こんにちは
アプローチ案は2つあって、文字入力するか
デートピッカーを使うかになるかと思います。
前者は選択しているセレクターの見直し、あるいは入力モードの見直しからでしょうか。
後者は例えば以下が参考になるかと思います。
Hi,
As I cannot access the calendar, the following is a mock sample. Hope this helps you.
[image]
colIndex = 2+CInt(dateVar.DayOfWeek)
rowIndex = 4+((dateVar.Day+New DateTime(dateVar.Year,dateVar.Month,1).DayOfWeek-1) \ 7)
strDay = dateVar.Day.ToString
Sequence3.xaml (80.1 KB)
Please see also document of dynamic selectors.
Regards,