Questions:
My approach:
For the below html code snippet,
when I do
> t <- remDr$findElement('xpath', "//li[@data-iid = '1468']")
> t$getElementText()
I get
[[1]]
[1] "Handel"
However, when I now search for
> remDr$findElement('xpath', "//li[text() = 'Handel']")
Answer:
remDr$findElement('xpath', "//li[. = 'Handel']")
solves it.
With text()
, I don't get the bold text. RSelenium is misleading in this as it does not return the text()
when I use getElementText()
, it rather returns .
.