Hello. I’m trying to handle the selector where the title is a date. It changes with date. How to handle this? Please advise.
‘saplogon.exe’ cls=‘SAP_FRONTEND_SESSION’ title=‘SAP Directories ( 08.06.2020 1* CRR dbrcrrci01 )’ />
I need to handle the “title” where I must replace the date (08.062020) dynamically.
Thank you
SenzoD
(Senzo Dlomo)
June 8, 2020, 8:33pm
2
@Pavan_Patke , create a variable and assign DateTime.Now.ToString(“dd.MM.yyyy")
and parse that variable into the selector, that will always be current date, let me know if you need further assistance.
ppr
(Peter Preuss)
June 8, 2020, 8:58pm
3
@Pavan_Patke
Welcome to the forum
Using a variable as described above is very common. Setting up the dynamic part within the selector is described here:
This tutorial will teach you how to easily use variables in your selectors. In other words, we will be making dynamic selectors without the use of the old method of concatenating strings. How cool is that!
For the purpose of this tutorial, I will make 1 click in the Notepad app.
Feel free to also reference our documentation here .
Let’s begin!
1. First, we will indicate the element we want to click on. In this case, it will be File menu in Notepad:
[image]
This results in the…