How to handle attribute rel="nofollow' | Selenium Forum
M
Posted on 23/08/2015
Hi Ashish,

I am trying to get text from hyperlinks using following code:

System.out.println(driver.findElement(By.xpath("html/body/div[1]/div[2]/div[2]/div[2]/ul/li[7]/div[2]/div[2]/div/ul/li/a")).getText());

but there is displaying blank line not text of hyperlink.

Here hyperlink has a attribute 'rel' with value "nofollow". I think rel attribute is reason for this.

M
Replied on 23/08/2015

Can we have link of app
OR src code of hypermink area


M
Replied on 23/08/2015

Sorry, These all are hidden components, i knew about it after further watching videos.