Description
The Name
property returns the name of a mobile browser profile as it is specified in the project’s Virtual Browsers properties.
Declaration
VirtualBrowserInfoObj.Name
Read-Only Property | String |
VirtualBrowserInfoObj | An expression, variable or parameter that specifies a reference to a VirtualBrowserInfo object |
Applies To
The property is applied to the following object:
Property Value
The name of a mobile browser profile. For example, Apple iPhone 5.
Example
The following example lists all enabled mobile browser profiles defined in the project:
JavaScript, JScript
function Test()
{
for (var i = 0; i < VirtualBrowsers.Count; i++)
{
Log.Message(VirtualBrowsers.Item(i).Name);
}
}
Python
def Test():
for i in range (0, VirtualBrowsers.Count):
Log.Message(VirtualBrowsers.Item[i].Name);
VBScript
Sub Test
Dim i
For i = 0 To VirtualBrowsers.Count - 1
Call Log.Message(VirtualBrowsers.Item(i).Name)
Next
End Sub
DelphiScript
procedure Test;
var i;
begin
for i := 0 to VirtualBrowsers.Count - 1 do
begin
Log.Message(VirtualBrowsers.Item[i].Name);
end;
end;
C++Script, C#Script
function Test()
{
for (var i = 0; i < VirtualBrowsers["Count"]; i++)
{
Log["Message"](VirtualBrowsers["Item"](i)["Name"]);
}
}
See Also
Testing Mobile Web Applications Using Emulator
VirtualBrowsers Object
VirtualBrowserInfo Object
UserAgent Property
ScreenHeight Property
ScreenWidth Property
DevicePixelRatio Property
RunOptions Property