I'm using Selenium 2.12 and trying to interact with the WebDriver api
in my JUnit test. Is there any way, once I get a WebElement, that I
can figure out what HTML the WebElement contains? That would be
massively useful.
Massive thanks in advance, - Dave
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
On Nov 30, 10:39 am, Luke Inman-Semerau <luke.seme...@gmail.com>
wrote:
> Dave,
>
> You can always use the JavascriptExecutor to do a lot of things with it too
> (like get the innerHTML):
>
> String html = (String)((JavascriptExecutor)driver).executeScript("return
> arguments[0].innerHTML;", element);
>
> -Luke
>
> On Wed, Nov 30, 2011 at 8:33 AM, Krishnan Mahadevan <
>
>
>
>
>
>
>
> krishnan.mahadevan1...@gmail.com> wrote:
> > WebElement.getTagName()
> > WebElement.getAttribute(String attribName);
> > WebElement.getText();
>
> > These methods can be used to get some information about a WebElement.
>
> > Thanks & Regards
> > Krishnan Mahadevan
>
> > "All the desirable things in life are either illegal, expensive, fattening
> > or in love with someone else!"
>