Skip to content

Commit 0070384

Browse files
committed
redo bookmark fixes without whitespace removal
1 parent b712f7e commit 0070384

3 files changed

+1066
-1067
lines changed

docs/vs-2015/test/using-html5-controls-in-coded-ui-tests.md

Lines changed: 120 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -12,131 +12,130 @@ manager: jillfra
1212
# Using HTML5 Controls in Coded UI Tests
1313
[!INCLUDE[vs2017banner](../includes/vs2017banner.md)]
1414

15-
Coded UI tests include support for some of the HTML5 controls that are included in Internet Explorer 9 and Internet Explorer 10.
16-
17-
**Requirements**
18-
19-
- Visual Studio Enterprise
20-
15+
Coded UI tests include support for some of the HTML5 controls that are included in Internet Explorer 9 and Internet Explorer 10.
16+
17+
**Requirements**
18+
19+
- Visual Studio Enterprise
20+
2121
> [!WARNING]
22-
> In versions prior to Internet Explorer 10, it was possible to run coded UI tests in a higher privilege level compared to that of the Internet Explorer process. When running coded UI tests on Internet Explorer 10, both the coded UI test and the Internet Explorer process must be at the same privilege level. This is because of more secure AppContainer features in Internet Explorer 10.
23-
22+
> In versions prior to Internet Explorer 10, it was possible to run coded UI tests in a higher privilege level compared to that of the Internet Explorer process. When running coded UI tests on Internet Explorer 10, both the coded UI test and the Internet Explorer process must be at the same privilege level. This is because of more secure AppContainer features in Internet Explorer 10.
23+
2424
> [!WARNING]
25-
> If you create a coded UI test in Internet Explorer 10, it might not run using Internet Explorer 9 or Internet Explorer 8. This is because Internet Explorer 10 includes HTML5 controls such as Audio, Video, ProgressBar and Slider. These HTML5 controls are not recognized by Internet Explorer 9, or Internet Explorer 8. Likewise, your coded UI test using Internet Explorer 9 might include some HTML5 controls that also will not be recognized by Internet Explorer 8.
26-
27-
## Supported HTML5 Controls
28-
Coded UI tests include support for record, playback, and validation of the following HTML5 controls:
29-
30-
- [Audio Control](#audio-control)
31-
32-
- [Video Control](#UsingHTML5ControlsCodedUITestsVideo)
33-
34-
- [Slider](#UsingHTML5ControlsCodedUITestsSlider)
35-
36-
- [ProgressBar](#progressbar)
37-
38-
### Audio Control
39-
**Audio control:** Actions on the HTML5 Audio control are correctly recorded and played back.
40-
41-
![HTML5 Audio control](../test/media/codedui-html5-audio.png "CodedUI_HTML5_Audio")
42-
43-
|Action|Recording|Generated Code|
44-
|------------|---------------|--------------------|
45-
|**Play audio**<br /><br /> Directly from control, or from controls context menu.|Play \<name> Audio from 00:00:00|HtmlAudio.Play(TimeSpan)|
46-
|**Seek to a specific time in the audio**|Seek \<name> Audio to 00:01:48|HtmlAudio.Seek(TimeSpan)|
47-
|**Pause audio**<br /><br /> Directly from control, or from controls context menu.|Pause \<name> Audio at 00:01:53|HtmlAudio.Pause(TimeSpan)|
48-
|**Mute audio**<br /><br /> Directly from control, or from controls context menu.|Mute \<name> Audio|HtmlAudio.Mute()|
49-
|**Unmute audio**<br /><br /> Directly from control, or from controls context menu.|Unmute \<name> Audio|HtmlAudio.Unmute()|
50-
|**Change volume of audio**|Set volume of \<name> Audio to 79%|HtmlAudio.SetVolume(float)|
51-
52-
The following properties are available for HtmlAudio and you can add an assertion on all of them:
53-
54-
```
55-
string AutoPlay
56-
string Controls
57-
string CurrentSrc
58-
string CurrentTime
59-
string CurrentTimeAsString
60-
string Duration
61-
string DurationAsString
62-
string Ended
63-
string Loop
64-
string Muted
65-
string Paused
66-
string PlaybackRate
67-
string ReadyState
68-
string Seeking
69-
string Src
70-
string Volume
71-
72-
```
73-
74-
**Search properties:** The search properties for `HtmlAudio` are `Id`, `Name` and `Title`.
75-
76-
**Filter properties:** The filter properties for `HtmlAudio` are `Src`, `Class`, `ControlDefinition` and `TagInstance`.
77-
25+
> If you create a coded UI test in Internet Explorer 10, it might not run using Internet Explorer 9 or Internet Explorer 8. This is because Internet Explorer 10 includes HTML5 controls such as Audio, Video, ProgressBar and Slider. These HTML5 controls are not recognized by Internet Explorer 9, or Internet Explorer 8. Likewise, your coded UI test using Internet Explorer 9 might include some HTML5 controls that also will not be recognized by Internet Explorer 8.
26+
27+
## Supported HTML5 Controls
28+
Coded UI tests include support for record, playback, and validation of the following HTML5 controls:
29+
30+
- [Audio Control](#audio-control)
31+
32+
- [Video Control](#video-control)
33+
34+
- [Slider](#slider)
35+
36+
- [ProgressBar](#progressbar)
37+
38+
### Audio Control
39+
**Audio control:** Actions on the HTML5 Audio control are correctly recorded and played back.
40+
41+
![HTML5 Audio control](../test/media/codedui-html5-audio.png)
42+
43+
|Action|Recording|Generated Code|
44+
|------------|---------------|--------------------|
45+
|**Play audio**<br /><br /> Directly from control, or from controls context menu.|Play \<name> Audio from 00:00:00|HtmlAudio.Play(TimeSpan)|
46+
|**Seek to a specific time in the audio**|Seek \<name> Audio to 00:01:48|HtmlAudio.Seek(TimeSpan)|
47+
|**Pause audio**<br /><br /> Directly from control, or from controls context menu.|Pause \<name> Audio at 00:01:53|HtmlAudio.Pause(TimeSpan)|
48+
|**Mute audio**<br /><br /> Directly from control, or from controls context menu.|Mute \<name> Audio|HtmlAudio.Mute()|
49+
|**Unmute audio**<br /><br /> Directly from control, or from controls context menu.|Unmute \<name> Audio|HtmlAudio.Unmute()|
50+
|**Change volume of audio**|Set volume of \<name> Audio to 79%|HtmlAudio.SetVolume(float)|
51+
52+
The following properties are available for HtmlAudio and you can add an assertion on all of them:
53+
54+
```
55+
string AutoPlay
56+
string Controls
57+
string CurrentSrc
58+
string CurrentTime
59+
string CurrentTimeAsString
60+
string Duration
61+
string DurationAsString
62+
string Ended
63+
string Loop
64+
string Muted
65+
string Paused
66+
string PlaybackRate
67+
string ReadyState
68+
string Seeking
69+
string Src
70+
string Volume
71+
```
72+
73+
**Search properties:** The search properties for `HtmlAudio` are `Id`, `Name` and `Title`.
74+
75+
**Filter properties:** The filter properties for `HtmlAudio` are `Src`, `Class`, `ControlDefinition` and `TagInstance`.
76+
7877
> [!NOTE]
79-
> The amount of time for Seek and Pause can be significant. During playback, the coded UI test will wait until the specified time in `(TimeSpan)` before Pausing the audio. If by some special circumstance, the specified time has passed before hitting the Pause command, an exception will be thrown.
80-
81-
### <a name="UsingHTML5ControlsCodedUITestsVideo"></a> Video Control
82-
**Video control:** Actions on the HTML5 Video control are correctly recorded and played back.
83-
84-
![HTML5 Video control](../test/media/codedui-html5-video.png "CodedUI_HTML5_Video")
85-
86-
|Action|Recording|Generated Code|
87-
|------------|---------------|--------------------|
88-
|**Play video**<br /><br /> Directly from control, or from controls context menu.|Play \<name> Video from 00:00:00|HtmlVideo.Play(TimeSpan)|
89-
|**Seek to a specific time in the video**|Seek \<name> Video to 00:01:48|HtmlVideo.Seek(TimeSpan)|
90-
|**Pause video**<br /><br /> Directly from control, or from controls context menu.|Pause \<name> Video at 00:01:53|HtmlVideo.Pause(TimeSpan)|
91-
|**Mute video**<br /><br /> Directly from control, or from controls context menu.|Mute \<name> Video|HtmlVideo.Mute()|
92-
|**Unmute video**<br /><br /> Directly from control, or from controls context menu.|Unmute \<name> Video|HtmlVideo.Unmute()|
93-
|**Change volume of video**|Set volume of \<name> Video to 79%||
94-
95-
All the properties of HtmlAudio are available for HtmlVideo. In addition, the following three properties are also available. Assertion can be added on all of them.
96-
97-
```
98-
string Poster
99-
string VideoHeight
100-
string VideoWidth
101-
102-
```
103-
104-
**Search properties:** The search properties for `HtmlVideo` are `Id`, `Name` and `Title`.
105-
106-
**Filter properties:** The filter properties for `HtmlVideo` are `Src`, `Poster`, `Class`, `ControlDefinition` and `TagInstance`.
107-
78+
> The amount of time for Seek and Pause can be significant. During playback, the coded UI test will wait until the specified time in `(TimeSpan)` before Pausing the audio. If by some special circumstance, the specified time has passed before hitting the Pause command, an exception will be thrown.
79+
80+
### Video Control
81+
**Video control:** Actions on the HTML5 Video control are correctly recorded and played back.
82+
83+
![HTML5 Video control](../test/media/codedui-html5-video.png)
84+
85+
|Action|Recording|Generated Code|
86+
|------------|---------------|--------------------|
87+
|**Play video**<br /><br /> Directly from control, or from controls context menu.|Play \<name> Video from 00:00:00|HtmlVideo.Play(TimeSpan)|
88+
|**Seek to a specific time in the video**|Seek \<name> Video to 00:01:48|HtmlVideo.Seek(TimeSpan)|
89+
|**Pause video**<br /><br /> Directly from control, or from controls context menu.|Pause \<name> Video at 00:01:53|HtmlVideo.Pause(TimeSpan)|
90+
|**Mute video**<br /><br /> Directly from control, or from controls context menu.|Mute \<name> Video|HtmlVideo.Mute()|
91+
|**Unmute video**<br /><br /> Directly from control, or from controls context menu.|Unmute \<name> Video|HtmlVideo.Unmute()|
92+
|**Change volume of video**|Set volume of \<name> Video to 79%||
93+
94+
All the properties of HtmlAudio are available for HtmlVideo. In addition, the following three properties are also available. Assertion can be added on all of them.
95+
96+
```
97+
string Poster
98+
string VideoHeight
99+
string VideoWidth
100+
101+
```
102+
103+
**Search properties:** The search properties for `HtmlVideo` are `Id`, `Name` and `Title`.
104+
105+
**Filter properties:** The filter properties for `HtmlVideo` are `Src`, `Poster`, `Class`, `ControlDefinition` and `TagInstance`.
106+
108107
> [!NOTE]
109-
> If you rewind or fast forward the video using -30s or +30s labels, this will be aggregated to seek to the appropriate time.
110-
111-
### <a name="UsingHTML5ControlsCodedUITestsSlider"></a> Slider
112-
**Slider control:** Actions on the HTML5 Slider control are correctly recorded and played back.
113-
114-
![HTML5 Slider control](../test/media/codedui-html5-slider.png "CodedUI_HTML5_Slider")
115-
116-
|Action|Recording|Generated Code|
117-
|------------|---------------|--------------------|
118-
|**Set a position in the slider**|Set position to \<x> in \<name> slider|HtmlSlider.ValueAsNumber=\<x>|
119-
120-
The following properties are available for HtmlSlider and assertion can be added on all of them:
121-
122-
```
123-
string Disabled
124-
string Max
125-
string Min
126-
string Required
127-
string Step
128-
string ValueAsNumber
129-
```
130-
131-
### ProgressBar
132-
**ProgressBar control:** The ProgressBar is a non-interactable control. You can add assertions on the `Value` and `Max` properties of this control.
133-
134-
![HTML5 ProgressBar control](../test/media/codedui-html5-progressbar.png "CodedUI_HTML5_ProgressBar")
135-
108+
> If you rewind or fast forward the video using -30s or +30s labels, this will be aggregated to seek to the appropriate time.
109+
110+
### Slider
111+
**Slider control:** Actions on the HTML5 Slider control are correctly recorded and played back.
112+
113+
![HTML5 Slider control](../test/media/codedui-html5-slider.png)
114+
115+
|Action|Recording|Generated Code|
116+
|------------|---------------|--------------------|
117+
|**Set a position in the slider**|Set position to \<x> in \<name> slider|HtmlSlider.ValueAsNumber=\<x>|
118+
119+
The following properties are available for HtmlSlider and assertion can be added on all of them:
120+
121+
```
122+
string Disabled
123+
string Max
124+
string Min
125+
string Required
126+
string Step
127+
string ValueAsNumber
128+
```
129+
130+
### ProgressBar
131+
**ProgressBar control:** The ProgressBar is a non-interactable control. You can add assertions on the `Value` and `Max` properties of this control.
132+
133+
![HTML5 ProgressBar control](../test/media/codedui-html5-progressbar.png)
134+
136135
## See also
137136

138-
- [HTML Elements](https://www.w3schools.com/HTML/html_elements.asp)
139-
- [Use UI Automation To Test Your Code](../test/use-ui-automation-to-test-your-code.md)
140-
- [Creating Coded UI Tests](../test/use-ui-automation-to-test-your-code.md#VerifyingCodeUsingCUITCreate)
141-
- [Customizing your coded UI test](../test/use-ui-automation-to-test-your-code.md#VerifyingCodeCUITModify)
137+
- [HTML Elements](https://www.w3schools.com/HTML/html_elements.asp)
138+
- [Use UI Automation To Test Your Code](../test/use-ui-automation-to-test-your-code.md)
139+
- [Creating Coded UI Tests](../test/use-ui-automation-to-test-your-code.md#VerifyingCodeUsingCUITCreate)
140+
- [Customizing your coded UI test](../test/use-ui-automation-to-test-your-code.md#VerifyingCodeCUITModify)
142141
- [Supported Configurations and Platforms for Coded UI Tests and Action Recordings](../test/supported-configurations-and-platforms-for-coded-ui-tests-and-action-recordings.md)

0 commit comments

Comments
 (0)