Also we’ll periodically save screenshots and snapshots (html content of the page) and record test video.
<?xml version="1.0" encoding="UTF-8"?>
<testcase xmlns="https://www.jazzteam.org/Routines" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="video on youtube" description="Find video on youtube" tags="Basic, youtube">
<test coverage="100" name="01 YouTube" description="Find the video and check that the page is present 'Like'"
tags="youtube, navigate, webelement, field, button" >
<!-- Your test steps goes here -->
</test>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<testcase xmlns="https://www.jazzteam.org/Routines" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="video on youtube" description="Find video on youtube" tags="Basic, youtube">
<test coverage="100" name="01 YouTube" description="Find the video and check that the page is present 'Like'"
tags="youtube, navigate, webelement, field, button" >
<!-- start video recording -->
<video action="start"/>
<!-- go to youtube.com -->
<navigate to="https://www.youtube.com/"/>
</test>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<testcase xmlns="https://www.jazzteam.org/Routines" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="video on youtube" description="Find video on youtube" tags="Basic, youtube">
<test coverage="100" name="01 YouTube" description="Find the video and check that the page is present 'Like'"
tags="youtube, navigate, webelement, field, button" >
<!-- start video recording -->
<video action="start"/>
<!-- go to youtube.com -->
<navigate to="https://www.youtube.com/"/>
<!-- write text "humor" in text field -->
<field id='masthead-search-term' textToType="humor"/>
<!-- press the button to search -->
<button id="search-btn"/>
<!-- put a pause to load the contents of the page -->
<pause time="3000"/>
<!-- create an image of the page -->
<screenshot/>
<!-- create a copy of the page -->
<snapshot/>
</test>
</testcase>
<?xml version="1.0" encoding="UTF-8"?>
<testcase xmlns="https://www.jazzteam.org/Routines" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="video on youtube" description="Find video on youtube" tags="Basic, youtube">
<test coverage="100" name="01 YouTube" description="Find the video and check that the page is present 'Like'"
tags="youtube, navigate, webelement, field, button" >
<!-- start video recording -->
<video action="start"/>
<!-- go to youtube.com -->
<navigate to="https://www.youtube.com/"/>
<!-- write text "humor" in text field -->
<field id='masthead-search-term' textToType="humor"/>
<!-- press the button to search -->
<button id="search-btn"/>
<!-- put a pause to load the contents of the page -->
<pause time="3000"/>
<!-- stop video recording -->
<video action="stop"/>
<!-- create an image of the page -->
<screenshot/>
<!-- create a copy of the page -->
<snapshot/>
<!-- Click on the first video clip from the list -->
<webelement xpath="//*[@id='search-results']/li[@data-context-item-type='video'][1]"
action="click"/>
<!-- put a pause to load the contents of the page -->
<pause time="3000"/>
<!-- check that the page is present like -->
<webelement xpath="//button[@id='watch-like']//span[@class='yt-uix-button-content']"
action="isContainsText" text="Like"/>
<screenshot/>
<snapshot/>
</test>
</testcase>
You are ready for reading more advanced tutorial with twitter testing example.