How to split date string using Selenium webdriver -
i'm retrieving text value of last updated time application.
output looks this:
03/02/2016 5:40:78
time dynamically changing. using "get text" retrieve last updated time , outputting console.
i want split data.
use split
function achieve same. can observe there space between date , time
string[] datetime = driver.findelement(by.xpath("your locator")).gettext().split(" "); string date = datetime[0]; string time = datetime[1]; system.out.println(date); system.out.println(time);
Comments
Post a Comment