Closed wijdench closed 7 years ago
You can grab the HTML source via the Browser property on the page object or you can search for an element on the page by text too. Does that meet your needs?
I used Find.Element(By.ClassName("s44")).Text;
but it return always null,
I tried to get all the document text by js.ExecuteScript("return document.body.innerText;")
or Find.Element(By.TagName("body")).Text
but it return just the page head that contains the menu and not the body .
I tried also this code BrowserHost.Instance.Application.Browser.PageSource
to get the page source and it returns the body without the main part wich is the report document.
I dont know how to get into the report information.
Is the report within an iframe?
Yes it is.
In that case you'll need to target your selectors to that frame.
Check this out: http://stackoverflow.com/questions/9607964/selenium-unable-to-access-iframe-and-data-inside-it
Thanks for your response. It helps me a lot.
No worries :)
Hi,
Can I get the text of a Telerik report generated in a link by selenuim webdriver c#? I just want to verify in Assertion that the report contains a string, Thanks.