[Selenium - C#] Substring ReadOnlyCollection

49 views
Skip to first unread message

Rafael s

unread,
Feb 12, 2015, 4:48:49 PM2/12/15
to webd...@googlegroups.com
Hi,

In my code below:

ReadOnlyCollection<IWebElement> links = driver.FindElements(By.ClassName("resultado-voos-item-perna-trechos-o-trecho-saida"));
IWebElement saida = links[0];

This code return the value: Saída 11:42

But I want to capture only 11:42.

How can I do this?

sunny sachdeva

unread,
Feb 12, 2015, 10:16:44 PM2/12/15
to webd...@googlegroups.com
How about splitting on basis of space

String str="Saída 11:42";
String[]arr=str.split(" ");
System.out.println(arr[1]);

Thanks
S
Reply all
Reply to author
Forward
0 new messages