HI,
I'm not able to retrieve the text from the following HTML:
<iframe width="800px" height="700px" frameborder="0" src="/cs/ContentServer?c=Article_C&pagename=NTMain%2FArticle_C%2FFeature%2FDetail&rendermode=preview&cid=1355791606640">
<html>
<head>
<script src="//
nexus.ensighten.com/website/Bootstrap.js" type="text/javascript">
<style>
<style type="text/css">
</head>
<body class="jsloaded" data-twttr-rendered="true">
<div class="pageContent" role="main">
<div class="width-8">
<div class="tile" role="article">
<h3>
Test_Article_Fri Nov 15 17:19:42 GMT</h3>
<div class="articleTabs">
<div class="articleContent">
</div>
</div>
<div class="width-4">
</div>
<div id="tiptip_holder" style="max-width:200px;">
</body>
</html>
</iframe>
Here is my Webdriver code:
WebElement articleName = driver.findElement(By.cssSelector(".tile>h3"));
articleName.getText();
System.out.println(articleName);
What gets printed to console is simply the locator, rather than the string itself.
Any ideas?
Thanks