# Get attribute

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-16fe17ef234f0a75f66653bd0d591d691075f801%2Fimage%20\(162\).png?alt=media)

Element that obtains the data of a control element attribute. The component works correctly only inside the Open a Browser or Connect to a Browser container.

![](https://1755238209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNnEkyZmLMSWTDXxpygbG%2Fuploads%2Fgit-blob-6e2dc0155f371c0f1b34d84372c20fa88dff3fca%2F1%20\(56\).png?alt=media)

Properties

\- Search template: \[String] Control element search template

\- Element: \[LTools.WebBrowser.Model.IElementInfo] Reference to a control element

\- Attribute: \[String] Control attribute name

\- Result: \[String] Variable for saving data of the first found attribute

\- Result (array): \[List\<string>] Variable for saving the data of all attributes found

\- Timeout\*: \[Int32] Maximum waiting time for process completion (ms)

```
C#
LTools.WebBrowser.BrowserApp app = LTools.WebBrowser.BrowserApp.Init(wf, "Free email*", LTools.WebBrowser.Model.BrowserTypes_Short.IE);
//Search pattern
List<string> att = app.GetAttribute("{\"Tag\":\"INPUT\",\"SearchFrames\":false,\"Attributes\":[{\"Key\":\"CLASS\",\"Value\":\"textbox js-hide-label\"},{\"Key\":\"ID\",\"Value\":\"header-search-input\"}]}", "title");
//Component link
LTools.WebBrowser.Model.IElementInfo el = app.FindElement("{\"Tag\":\"INPUT\",\"SearchFrames\":false,\"Attributes\":[{\"Key\":\"CLASS\",\"Value\":\"textbox js-hide-label\"},{\"Key\":\"ID\",\"Value\":\"header-search-input\"}]}");
att = app.GetAttribute(el, "title");		
LTools.Workflow.AstroApp.AddToLog(wf, att[0]);

Python
app = LTools.WebBrowser.BrowserApp.Init(wf, "Free email*", LTools.WebBrowser.Model.BrowserTypes_Short.IE)
#Search pattern
att = app.GetAttribute("{\"Tag\":\"INPUT\",\"SearchFrames\":false,\"Attributes\":[{\"Key\":\"CLASS\",\"Value\":\"textbox js-hide-label\"},{\"Key\":\"ID\",\"Value\":\"header-search-input\"}]}", "title")
#Component link
el = app.FindElement("{\"Tag\":\"INPUT\",\"SearchFrames\":false,\"Attributes\":[{\"Key\":\"CLASS\",\"Value\":\"textbox js-hide-label\"},{\"Key\":\"ID\",\"Value\":\"header-search-input\"}]}");
att = app.GetAttribute(el, "title");	
LTools.Workflow.AstroApp.AddToLog(wf, att[0])

JavaScript
var app = _lib.LTools.WebBrowser.BrowserApp.Init(wf, "Free email*", _lib.LTools.WebBrowser.Model.BrowserTypes_Short.IE);
//Search pattern
var att = app.GetAttribute("{\"Tag\":\"INPUT\",\"SearchFrames\":false,\"Attributes\":[{\"Key\":\"CLASS\",\"Value\":\"textbox js-hide-label\"},{\"Key\":\"ID\",\"Value\":\"header-search-input\"}]}", "title");
//Component link
var el = app.FindElement("{\"Tag\":\"INPUT\",\"SearchFrames\":false,\"Attributes\":[{\"Key\":\"CLASS\",\"Value\":\"textbox js-hide-label\"},{\"Key\":\"ID\",\"Value\":\"header-search-input\"}]}");
att = app.GetAttribute(el, "title");	
_lib.LTools.Workflow.AstroApp.AddToLog(wf, att[0]);
```
