132 lines
4.1 KiB
HTML
132 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="cz">
|
||
<head>
|
||
<meta content="Dokumentace pro všechny testery" name="description" />
|
||
<meta content="Playwright, Test, Ukázka" name="keywords" />
|
||
<meta content="Lukáš Kaňka" name="author" />
|
||
<meta charset="UTF-8" />
|
||
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
|
||
<link href="/style.css" rel="stylesheet" />
|
||
<link
|
||
href="images/a picture of a text editor on a pc in the style of comics.jpg"
|
||
rel="shortcut icon"
|
||
/>
|
||
<title>Testing Docs - Playwright ukázka testu</title>
|
||
</head>
|
||
|
||
<body>
|
||
<h1>Testing Docs CZ</h1>
|
||
<h2>Dokumentace pro všechny testery</h2>
|
||
<hr />
|
||
<div class="menu">
|
||
<center>
|
||
<ul>
|
||
<li class="menu-item">
|
||
<a class="button" href="/index.html">Domů</a>
|
||
</li>
|
||
<li class="menu-item">
|
||
<a class="button" href="/podpora.html">Podpora</a>
|
||
</li>
|
||
<li class="menu-item">
|
||
<a class="button" href="/mapa-webu.html">Mapa webu</a>
|
||
</li>
|
||
<li class="menu-item">
|
||
<a class="button" href="/privaci-polici.html"
|
||
>Zásady o ochraně osobních dat</a
|
||
>
|
||
</li>
|
||
</ul>
|
||
</center>
|
||
</div>
|
||
<hr />
|
||
|
||
<div class="flexbox">
|
||
<div class="navigation">
|
||
<table>
|
||
<caption>
|
||
Rubriky:
|
||
</caption>
|
||
<tr>
|
||
<th class="not-dot">
|
||
<li>
|
||
<a class="button" href="/automatizovane-testovani.html"
|
||
>Automatizované testování</a
|
||
>
|
||
</li>
|
||
<li><a class="button" href="/nastroje.html">Nástroje</a></li>
|
||
<li>
|
||
<a class="button" href="/penetracni-testovani.html"
|
||
>Penetrační testování</a
|
||
>
|
||
</li>
|
||
<li>
|
||
<a class="button" href="/testing-obecne.html">Testing obečně</a>
|
||
</li>
|
||
<li>
|
||
<a class="button" href="/testovani-mobilnich-aplikaci.html"
|
||
>Testování mobilních aplikací</a
|
||
>
|
||
</li>
|
||
<li>
|
||
<a class="button" href="/testovani-pristupnosti.html"
|
||
>Testování přístupnosti</a
|
||
>
|
||
</li>
|
||
<li>
|
||
<a class="button" href="/zatezove-testovani.html"
|
||
>Zátěžové testování</a
|
||
>
|
||
</li>
|
||
</th>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="content">
|
||
<p class="big-text">Playwright ukázka testu</p>
|
||
<p>Do soboru na importujeme browser</p>
|
||
<div class="code-box">
|
||
<p>import { chromium } from „@playwright/test“;</p>
|
||
</div>
|
||
<p>Zapíšeme Konstruktor který se vždy spustí na začátku testu</p>
|
||
<div class="code-box">
|
||
<p>(async () => {</p>
|
||
</div>
|
||
|
||
<p>
|
||
V něm zpustíme browser a přiřadíme ho k příslušné proměnné pomocí
|
||
launch
|
||
</p>
|
||
|
||
<p>Před každe volání proměnné použijeme await</p>
|
||
<div class="code-box">
|
||
|
||
<p>pomocí headless: false – zobrazíme v testu prohlížeč</p>
|
||
</div>
|
||
</div>
|
||
<div class="articles">
|
||
<table>
|
||
<caption>
|
||
Nejdůležitější články:
|
||
</caption>
|
||
<tr>
|
||
<th class="not-dot">
|
||
<li>
|
||
<a class="button" href="co-je-automatizovane-testovani.html"
|
||
>Co je automatizované testování</a
|
||
>
|
||
</li>
|
||
<li>
|
||
<a class="button" href="otazky-a-odpovedi-playwright.html"
|
||
>Otázky a odpovědí k Playwright</a
|
||
>
|
||
</li>
|
||
</th>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<footer>Copyright © Lukáš Kaňka 2023</footer>
|
||
</body>
|
||
</html>
|