Update ReadMe files

This commit is contained in:
Michael Mintz 2019-11-04 01:16:47 -05:00
parent 1b2ab43fdc
commit 520a475962
6 changed files with 60 additions and 31 deletions

View File

@ -2,12 +2,14 @@
[<img src="https://img.shields.io/github/release/seleniumbase/SeleniumBase.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/releases) [<img src="https://dev.azure.com/seleniumbase/seleniumbase/_apis/build/status/seleniumbase.SeleniumBase?branchName=master" alt=" " />](https://dev.azure.com/seleniumbase/seleniumbase/_build/latest?definitionId=1&branchName=master) [<img src="https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master" alt=" " />](https://travis-ci.org/seleniumbase/SeleniumBase) [<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt=" " />](https://gitter.im/seleniumbase/SeleniumBase) [<img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE) [<img src="https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg" alt=" " />](https://github.com/seleniumbase/SeleniumBase/stargazers)
A complete framework for web automation, end-to-end testing, and [user-onboarding](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md). SeleniumBase uses [pytest](https://github.com/pytest-dev/pytest) for running Python scripts, while using [Selenium WebDriver](https://www.seleniumhq.org/) for controlling web browsers.
All-in-one framework for web automation, end-to-end testing, and website tours. SeleniumBase uses pytest for running Python scripts, while using Selenium WebDriver for controlling web browsers.
* No more flaky tests! (Smart-waiting keeps tests reliable.)
* Contains reliable, smart-waiting code to prevent flaky tests.
* Simplifies the process of creating UI tests for any website.
* Includes [Plugins](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/pytest_plugin.py) for logging [test results and screenshots](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md).
* Multiplies the abilities of [pytest](https://pytest.org) and [Selenium WebDriver](https://www.seleniumhq.org/).
* Uses versatile [Python methods](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md) and [command-line options](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).
* Has tools for [website tours](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md), [assisted-QA](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md), and [visual testing](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md).
* Includes tools for [assisted-QA](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md), [visual testing](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md), and [web tours](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md).
* Integrates with [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md), [Katalon Recorder](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_ide/ReadMe.md), and [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py).
* Supports [Azure Pipelines](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/azure/azure_pipelines/ReadMe.md), [GCP](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md), [TravisCI](https://github.com/seleniumbase/SeleniumBase/blob/master/.travis.yml), [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md), and more.
* To see the full list of SeleniumBase features, [click here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md).

View File

@ -1,4 +1,4 @@
### Info about hidden files on macOS
## Info about hidden files on macOS
Depending on your macOS settings, some files may be hidden from view in your Finder window, such as ``.gitignore``. To view all files, run the following command and then reopen the Finder window:
```bash
@ -6,6 +6,6 @@ defaults write com.apple.finder AppleShowAllFiles -bool true
```
More info on that can be found here:
https://www.defaults-write.com/show-hidden-files-in-os-x-finder/
https://www.macworld.co.uk/how-to/mac-software/hidden-files-mac-3520878/
https://setapp.com/how-to/show-hidden-files-on-mac
* https://www.defaults-write.com/show-hidden-files-in-os-x-finder/
* https://www.macworld.co.uk/how-to/mac-software/hidden-files-mac-3520878/
* https://setapp.com/how-to/show-hidden-files-on-mac

View File

@ -24,6 +24,8 @@ self.click_chain(selectors_list, by=By.CSS_SELECTOR, timeout=None, spacing=0)
self.type(selector, text, by=By.CSS_SELECTOR, timeout=None, retry=False)
self.input(selector, text, by=By.CSS_SELECTOR, timeout=None, retry=False)
self.update_text(selector, new_value, by=By.CSS_SELECTOR, timeout=None, retry=False)
self.add_text(selector, text, by=By.CSS_SELECTOR, timeout=None)

View File

@ -1,18 +1,9 @@
### Info about using Safari Driver for running automated tests on macOS
## Using Safari's WebDriver for running browser tests on macOS
(NOTE: SafariDriver requires Safari 10 running on OS X 10.11 El Capitan or greater)
*(NOTE: Safari's WebDriver requires macOS 10.13 "High Sierra" or later.)*
You can find info on Safari Driver if you scroll down to that section on the [SeleniumHQ downloads page](https://www.seleniumhq.org/download/).
You can find the official Apple documentation regarding "Testing with WebDriver in Safari" on the following page: https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
That page will tell you to [download the required Safari Driver browser extension (SafariDriver.safariextz) here at this link](http://selenium-release.storage.googleapis.com/index.html?path=2.48/).
Run ``safaridriver --enable`` once in a terminal to enable Safari's WebDriver. (If youre upgrading from a previous macOS release, you may need to prefix the command with ``sudo``.)
For that to work, you'll need to [download the Standalone Selenium Server from here](http://docs.seleniumhq.org/download/) and put that JAR file in ``/usr/local/bin/``. To make the next step easier, rename the downloaded JAR file to ``selenium-server-standalone.jar`` (if it's not already called that).
Next, configure the Selenium Server JAR file into your PATH like this:
```bash
export SELENIUM_SERVER_JAR=/usr/local/bin/selenium-server-standalone.jar
export PATH=$PATH:/usr/local/bin/selenium-server-standalone.jar
```
Now you're ready to run automated tests on Safari if you use ``--browser=safari`` on the command line when running your tests/scripts with SeleniumBase.
Now you can use ``--browser=safari`` to run your **SeleniumBase** tests on Safari.

View File

@ -1,23 +1,39 @@
### Verify that web drivers were successfully installed
## Verifying that web drivers are installed
*You can do this by checking inside a Python command prompt. (NOTE: xkcd is a webcomic)*
*You can do this by checking inside a Python command prompt.*
#### Verifying ChromeDriver
```bash
python
```
```python
>>> from selenium import webdriver
>>> browser = webdriver.Chrome()
>>> browser.get("http://xkcd.com/1337/")
>>> browser.close()
>>> driver = webdriver.Chrome()
>>> driver.get("https://www.google.com/chrome")
>>> driver.quit()
>>> exit()
```
#### Verifying FirefoxDriver (Geckodriver)
#### Verifying Geckodriver (Firefox WebDriver)
```bash
python
```
```python
>>> from selenium import webdriver
>>> browser = webdriver.Firefox()
>>> browser.get("http://xkcd.com/1337/")
>>> browser.close()
>>> driver = webdriver.Firefox()
>>> driver.get("https://www.mozilla.org/firefox")
>>> driver.quit()
>>> exit()
```
#### Verifying WebDriver for Safari
```bash
python
```
```python
>>> from selenium import webdriver
>>> driver = webdriver.Safari()
>>> driver.get("https://www.apple.com/safari")
>>> driver.quit()
>>> exit()
```

View File

@ -1 +1,19 @@
### The ReadMe for the Katalon / Selenium IDE conversion tool has been moved to: [seleniumbase/utilities/selenium_ide/ReadMe.md](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_ide/ReadMe.md) and all related code has been moved to [seleniumbase/utilities/selenium_ide](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_ide)
## Converting Katalon recordings into SeleniumBase test scripts
Katalon Recorder (Selenium IDE) is a tool that allows you to record and playback actions performed inside a web browser. It's available as a [downloadable Chrome extension](https://chrome.google.com/webstore/detail/katalon-recorder-selenium/ljdobmomdgdljniojadhoplhkpialdid) and a [downloadable Firefox extension](https://addons.mozilla.org/en-US/firefox/addon/katalon-automation-record/). The Katalon Recorder comes with an option to export recordings as various WebDriver test scripts, one of which is ``Python 2 (WebDriver + unittest)``. Unfortunately, these natively-exported scripts can be very messy and don't always run reliably. The purpose of this converter is to clean up and improve the scripts so that they can be used in production-level environments.
#### Step 1: Make a recording with the Katalon Recorder
![](https://cdn2.hubspot.net/hubfs/100006/images/katalon_recorder_2.png "Katalon Recorder example")
#### Step 2: Export your recording as a Python 2 Webdriver script
* ``{} Export`` => ``Python 2 (WebDriver + unittest)`` => ``Save As File``
#### Step 3: Run ``seleniumbase convert`` on your exported Python file
```
seleniumbase convert [MY_TEST.py]
```
* You should see a [MY_TEST_SB.py] file appear in the folder. (``_SB`` is added to the file name so that the original file stays intact in case you still need it.) This new clean & reliable SeleniumBase test script is ready to be added into your test suite for running.