How to get the Browser's Tab title text ?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
muditforyou
Posts: 7
Joined: Wed Feb 19, 2014 11:53 am
Location: India

How to get the Browser's Tab title text ?

Post by muditforyou » Wed Feb 19, 2014 11:59 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Mon Feb 24, 2014 6:37 pm

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
You do not have the required permissions to view the files attached to this post.

muditforyou
Posts: 7
Joined: Wed Feb 19, 2014 11:53 am
Location: India

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

Post by muditforyou » Fri Mar 07, 2014 10:17 am

Thank you :)