How to use Click after getting text of an autogenerated time stamp
Alberto last edited by
Using Java/Selenium and Page Objects, I have to create an item name that is auto generated using the current date and time and entered into a text field. I then have to verify that this item was created on a different page. I am storing the name (current date/time) in a string via locating the element and getting the value but at certain points this name will be a link that needs to be clicked.
How do I make the saved String name clickable?
Ex: Currently storing as
String name = ad.name1.getAttribute("value")
Cannot execute name.click()
emmalee last edited by
I hope what you want to do is :
You already have the link text stored in the variable 'name' . So once you are in the target page , use above command .