Page 1 of 1

How to get the Browser's Tab title text ?

Posted: Wed Feb 19, 2014 11:59 am
by muditforyou
Hi,

I want to get the Title of Browser's Tab and want to store it in a string variable. I'm using C# for my Scripts.
Please help me how to do it ?

Thanks,
Mudit

Re: How to get the Browser's Tab title text ?

Posted: Mon Feb 24, 2014 6:37 pm
by Support Team
Hi Mudit,

You can use, for example the "Get Value" action in the Ranorex Recorder using the caption attribute.
GetValue.png
You can also use the following code snippet in order to get the text of the browser tab.
YourVariable = repo.DomElement.Self.Element.GetAttributeValueText("Caption");
Regards,
Bernhard

Re: How to get the Browser's Tab title text ?

Posted: Fri Mar 07, 2014 10:17 am
by muditforyou
Thank you :)