Skip to content

Commit

Permalink
Update the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmintz committed Oct 14, 2023
1 parent f1354a9 commit d2cd00c
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion help_docs/mobile_testing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- SeleniumBase Docs -->

## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Mobile Testing
## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Mobile Mode / Mobile Testing

Use ``--mobile`` to run SeleniumBase tests using Chrome's mobile device emulator with default values for Device Metrics and User-Agent.

Expand Down Expand Up @@ -61,5 +61,29 @@ pytest test_swag_labs.py --mobile --agent="Mozilla/5.0 (Linux; Android 9; Pixel

--------

For some [SeleniumBase Syntax Formats](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md), you can also use `mobile=True` to run tests in Mobile Mode:

```python
from seleniumbase import Driver

driver = Driver(mobile=True)
try:
driver.open("https://www.skype.com/en/get-skype/")
driver.assert_element('[aria-label="Microsoft"]')
driver.assert_text("Download Skype", "h1")
driver.highlight("div.appBannerContent")
driver.highlight("h1")
driver.assert_text("Skype for Mobile", "h2")
driver.highlight("h2")
driver.highlight("#get-skype-0")
driver.highlight_click("span[data-dropdown-icon]")
driver.highlight("#get-skype-0_android-download")
driver.highlight('[data-bi-id*="ios"]')
finally:
driver.quit()
```

--------

<p align="center"><div align="center"><a href="https://seleniumbase.io">
<img src="https://img.shields.io/badge/docs-%20seleniumbase.io-11BBDD.svg" alt="SeleniumBase.io Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://img.shields.io/badge/✅%20💛%20View%20Code-on%20GitHub%20🌎%20🚀-02A79E.svg" alt="SeleniumBase.io Docs" /></a></div></p>

0 comments on commit d2cd00c

Please sign in to comment.