Reputation: 97
I've been trying to get the element of this status message after adding an existing record. Still don't have luck on trying to make it work. Any ideas on getting this element? Any answers will be much appreciated thank you!
UPDATE::
I can get the element of [ 10:45:02 - HR206 ]Job Record Already Exists what i only need is the Job Record Already Exists w/o the time.
Upvotes: 0
Views: 81
Reputation: 3927
Did you try with xpath = //ul[@id='currentMessage']/li
String message=driver.findElement(By.xpath("//ul[@id='currentMessage']/li")).getText();
Thank You
Upvotes: 1