<h4>Lotus</h4>
My goal is to extract the value of Lotus from the h4 tag. In a previous post, I found a solution using a JavaScript command:
document.getElementById('17285').getElementsByTagName('h4')[0].innerHTML;
This worked perfectly for me.
Now, I want to implement this JavaScript code in Selenium.
I attempted the following code:
MsgBox driver.executeScript("javascript:document.getElementById('17285').getElementsByTagName('h4')[0].innerHTML;")
However, I am getting an empty message box. Can anyone help me understand why?
Thank you in advance for your assistance!