SyntaxFix
Write A Post
Hire A Developer
Questions
I agree css is better. If you did want to do it via Xpath you could try:
String kk = wd.findElement(By.xpath(.//*div[@id='customSelect_3']/div/span[@class='selectLabel clear'].getText()))