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: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

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
GetValue.png (17.43 KiB) Viewed 945 times
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
.
Image

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 :)