Update the docs
This commit is contained in:
parent
5190ece3ae
commit
a3db7b4372
|
@ -12,12 +12,12 @@ To handle automated visual testing, SeleniumBase uses the ``self.check_window()`
|
||||||
The first time a test calls ``self.check_window()`` with a unique ``name`` parameter, the visual baseline is set, which means a folder is created with the following files:
|
The first time a test calls ``self.check_window()`` with a unique ``name`` parameter, the visual baseline is set, which means a folder is created with the following files:
|
||||||
|
|
||||||
<li><b>page_url.txt</b> -> The URL of the current window</li>
|
<li><b>page_url.txt</b> -> The URL of the current window</li>
|
||||||
<li><b>screenshot.png</b> -> A screenshot of the current window</li>
|
<li><b>baseline.png</b> -> The baseline screenshot (PNG)</li>
|
||||||
<li><b>tags_level1.txt</b> -> HTML tags from the window</li>
|
<li><b>tags_level1.txt</b> -> HTML tags from the window</li>
|
||||||
<li><b>tags_level2.txt</b> -> HTML tags + attribute names</li>
|
<li><b>tags_level2.txt</b> -> HTML tags + attribute names</li>
|
||||||
<li><b>tags_level3.txt</b> -> HTML tags + attribute names+values</li>
|
<li><b>tags_level3.txt</b> -> HTML tags + attribute names+values</li>
|
||||||
|
|
||||||
After the first time ``self.check_window()`` is called, later calls will compare the HTML tags and attributes of the latest window to the ones from the first call (<i>or to the ones from the call when the baseline was last reset</i>).
|
After the first time ``self.check_window()`` is called, later calls will compare the HTML tags and attributes of the latest window to the ones from the first call (*or to the ones from the call when the baseline was last reset*). Additionally, a ``latest.png`` screenshot is saved in the same folder, which can help you determine if/when the existing baseline needs to be reset.
|
||||||
|
|
||||||
Here's an example call:
|
Here's an example call:
|
||||||
|
|
||||||
|
@ -132,10 +132,13 @@ First differing element 33:
|
||||||
*
|
*
|
||||||
*** Exception: <Level 3> Visual Diff Failure:
|
*** Exception: <Level 3> Visual Diff Failure:
|
||||||
* HTML tag attribute values don't match the baseline!
|
* HTML tag attribute values don't match the baseline!
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's an example where a web site logo is resized:
|
Here's the ``side_by_side.html`` file for that, (from the ``./latest_logs/`` folder), which shows a visual comparison of the two screenshots as a result of the missing "Donate" button:
|
||||||
|
|
||||||
|
<img style="border: 1px solid #222222;" src="https://seleniumbase.io/cdn/img/visual_comparison.png" title="SeleniumBase Visual Comparison" />
|
||||||
|
|
||||||
|
Here's another example, where a web site logo is resized:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from seleniumbase import BaseCase
|
from seleniumbase import BaseCase
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 203 B |
|
@ -8,7 +8,7 @@ Markdown==3.3.6;python_version>="3.6"
|
||||||
MarkupSafe==2.0.1;python_version>="3.6"
|
MarkupSafe==2.0.1;python_version>="3.6"
|
||||||
pyparsing==3.0.6;python_version>="3.6"
|
pyparsing==3.0.6;python_version>="3.6"
|
||||||
keyring==23.4.0;python_version>="3.6"
|
keyring==23.4.0;python_version>="3.6"
|
||||||
pkginfo==1.8.1;python_version>="3.6"
|
pkginfo==1.8.2;python_version>="3.6"
|
||||||
Jinja2==3.0.3;python_version>="3.6"
|
Jinja2==3.0.3;python_version>="3.6"
|
||||||
click==8.0.3;python_version>="3.6"
|
click==8.0.3;python_version>="3.6"
|
||||||
zipp==3.6.0;python_version>="3.6"
|
zipp==3.6.0;python_version>="3.6"
|
||||||
|
@ -22,7 +22,7 @@ nltk==3.6.5;python_version>="3.6"
|
||||||
watchdog==2.1.6;python_version>="3.6"
|
watchdog==2.1.6;python_version>="3.6"
|
||||||
mkdocs==1.2.3;python_version>="3.6"
|
mkdocs==1.2.3;python_version>="3.6"
|
||||||
mkdocs-material==8.0.2;python_version>="3.6"
|
mkdocs-material==8.0.2;python_version>="3.6"
|
||||||
mkdocs-exclude-search==0.5.3;python_version>="3.6"
|
mkdocs-exclude-search==0.5.4;python_version>="3.6"
|
||||||
mkdocs-simple-hooks==0.1.3
|
mkdocs-simple-hooks==0.1.3
|
||||||
mkdocs-material-extensions==1.0.3;python_version>="3.6"
|
mkdocs-material-extensions==1.0.3;python_version>="3.6"
|
||||||
mkdocs-minify-plugin==0.5.0
|
mkdocs-minify-plugin==0.5.0
|
||||||
|
|
Loading…
Reference in New Issue