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

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -