Skip to content

Commit d558b9a

Browse files
authored
Merge pull request #188 from seleniumbase/one-top-level-package
Make seleniumbase become the only top-level Python package
2 parents 87966aa + 058701e commit d558b9a

32 files changed

+95
-92
lines changed

MANIFEST.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ include .travis.yml
55
include .gitignore
66
include requirements.txt
77
include seleniumbase/core/create_db_tables.sql
8-
include integrations/selenium_grid/grid-hub
9-
include integrations/selenium_grid/grid-node
10-
include integrations/selenium_grid/font_color
11-
include integrations/selenium_grid/start-grid-hub.bat
12-
include integrations/selenium_grid/register-grid-node.bat
13-
include integrations/selenium_grid/start-grid-hub.sh
14-
include integrations/selenium_grid/register-grid-node.sh
8+
include seleniumbase/utilities/selenium_grid/grid-hub
9+
include seleniumbase/utilities/selenium_grid/grid-node
10+
include seleniumbase/utilities/selenium_grid/font_color
11+
include seleniumbase/utilities/selenium_grid/start-grid-hub.bat
12+
include seleniumbase/utilities/selenium_grid/register-grid-node.bat
13+
include seleniumbase/utilities/selenium_grid/start-grid-hub.sh
14+
include seleniumbase/utilities/selenium_grid/register-grid-node.sh

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Logo4d4.png" title="SeleniumBase" height="58">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
1+
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Logo3g.png" title="SeleniumBase" height="50">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
22

33
[<img src="https://img.shields.io/pypi/v/seleniumbase.svg" alt="Version" />](https://pypi.python.org/pypi/seleniumbase) [<img src="https://img.shields.io/github/stars/seleniumbase/seleniumbase.svg" alt="GitHub Stars" />](https://github.com/seleniumbase/SeleniumBase/stargazers) [<img src="https://travis-ci.org/seleniumbase/SeleniumBase.svg?branch=master" alt="Build Status" />](https://travis-ci.org/seleniumbase/SeleniumBase) [<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="Join the Gitter Chat" />](https://gitter.im/seleniumbase/SeleniumBase)<br />
44

@@ -94,7 +94,7 @@ SeleniumBase methods automatically wait for page elements to finish loading befo
9494
SeleniumBase includes an automated/manual hybrid solution called **[MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md)**, which speeds up manual testing by having automation perform all the web browser actions while the manual tester only validates what is seen.
9595

9696
**Integrate with your favorite tools:**<br />
97-
SeleniumBase is compatible with [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_grid), [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md), [NodeJS](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), and [AWS](#amazon_section).
97+
SeleniumBase is compatible with [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_grid), [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Docker](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/docker/ReadMe.md), [NodeJS](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), and [AWS](#amazon_section).
9898

9999
**Comes with a business mindset:**<br />
100100
SeleniumBase makes it easy to automate tedious business tasks. (*To learn about businesses using SeleniumBase, [Click Here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/happy_customers.md).*)
@@ -106,7 +106,7 @@ SeleniumBase was originally built for [testing HubSpot's platform](https://produ
106106
([Read more about SeleniumBase features here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md))
107107

108108
<a id="seleniumbase_installation"></a>
109-
<img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Logo3d.png" title="SeleniumBase" height="48">
109+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Logo3g.png" title="SeleniumBase" height="48">
110110

111111
## Detailed Instructions:
112112

@@ -332,7 +332,7 @@ Here are some things you can do to setup a production environment for your testi
332332

333333
* You can setup a [Jenkins](https://jenkins.io/) build server for running tests at regular intervals. Jenkins has many plugins available, such as [the Xvfb headless browser plugin](https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin) for running tests on a machine with no GUI. If you have Xvfb running in the background, you can add ``--headless`` to your run command in order to utilize it. For more info about the Xvfb plugin, [read this](http://qxf2.com/blog/xvfb-plugin-for-jenkins-selenium/). For a real-world Jenkins example of headless browser automation in action, check out [the SeleniumBase Google Cloud ReadMe](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/google_cloud/ReadMe.md).
334334

335-
* You can use [the Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) to scale your testing by distributing tests on several machines with parallel execution. To do this, check out the SeleniumBase [selenium_grid folder](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_grid), which should have everything you need. The [Selenium Grid ReadMe](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/selenium_grid/ReadMe.md) will help you get started.
335+
* You can use [the Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) to scale your testing by distributing tests on several machines with parallel execution. To do this, check out the SeleniumBase [selenium_grid folder](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_grid), which should have everything you need. The [Selenium Grid ReadMe](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md) will help you get started.
336336

337337
* If you're using the [SeleniumBase MySQL feature](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mysql_installation.md) to save results from tests running on a server machine, you can install [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/) to help you read & write from your DB more easily. You'll also need to install the MySQL Python client. Depending on your system, you may need to install additional requirements for this (such as on Windows). See [Stackoverflow](https://stackoverflow.com/questions/43102442/whats-the-difference-between-mysqldb-mysqlclient-and-mysql-connector-python) for more info.
338338

@@ -696,4 +696,4 @@ Congratulations on getting started with SeleniumBase!
696696

697697
[https://github.com/mdmintz](https://github.com/mdmintz)<br />
698698

699-
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Button3.png" title="SeleniumBase" height="60">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) <br /> <img src="https://cdn2.hubspot.net/hubfs/100006/images/logo_base_4b.png" title="SeleniumBase" height="150">
699+
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/SB_Logo3g.png" title="SeleniumBase" height="60">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md) <br /> <img src="https://cdn2.hubspot.net/hubfs/100006/images/logo_base_4b.png" title="SeleniumBase" height="150">

help_docs/features_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Backwards-compatible with [WebDriver](http://www.seleniumhq.org/projects/webdriver/). (Use ``self.driver`` anywhere.)
1212
* Can run tests through a proxy server. (Use ``--proxy=IP_ADDRESS:PORT``)
1313
* Includes a hybrid-automation solution called **[MasterQA](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/masterqa/ReadMe.md)** to speed up manual testing.
14-
* Includes integrations with [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_grid), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), [Amazon S3](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/s3_logging_plugin.py), and [NodeJS](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js).
15-
* Includes a [tool to convert Selenium IDE recordings](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/selenium_ide) into clean & robust SeleniumBase scripts.
14+
* Includes integrations with [MySQL](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/core/testcase_manager.py), [Selenium Grid](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_grid), [Google Cloud](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/google_cloud/ReadMe.md), [Amazon S3](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/s3_logging_plugin.py), and [NodeJS](https://github.com/seleniumbase/SeleniumBase/tree/master/integrations/node_js).
15+
* Includes a [tool to convert Selenium IDE recordings](https://github.com/seleniumbase/SeleniumBase/tree/master/seleniumbase/utilities/selenium_ide) into clean & robust SeleniumBase scripts.
1616
* Written in Python, but can also make JavaScript calls using ``self.execute_script()``.
1717
* Includes useful Python decorators and password obfuscation methods. ([Learn more here](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/common/ReadMe.md))

help_docs/webdriver_installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ seleniumbase install iedriver
1111
seleniumbase install operadriver
1212
```
1313

14-
If you plan on using the [Selenium Grid integration](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/selenium_grid/ReadMe.md) (which allows for remote webdriver), you'll need to put the drivers on your System PATH. On a Mac and Linux, ``/usr/local/bin`` is a good PATH spot. On Windows, you may need to set the System PATH under Environment Variables to include the location where you placed the driver files. As a shortcut, you could place the driver files into your Python ``Scripts/`` folder in the location where you have Python installed, which should already be on your System PATH.
14+
If you plan on using the [Selenium Grid integration](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md) (which allows for remote webdriver), you'll need to put the drivers on your System PATH. On a Mac and Linux, ``/usr/local/bin`` is a good PATH spot. On Windows, you may need to set the System PATH under Environment Variables to include the location where you placed the driver files. As a shortcut, you could place the driver files into your Python ``Scripts/`` folder in the location where you have Python installed, which should already be on your System PATH.
1515

1616
Here's where you can go to manually install web drivers from the source:
1717

integrations/katalon/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
## This page has been moved to: [../selenium_ide/ReadMe.md](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/selenium_ide/ReadMe.md)
1+
### 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)

integrations/selenium_grid/ReadMe.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
## The Selenium Grid Hub
2-
3-
The Selenium Grid Hub lets you distribute tests to run in parallel across multiple node machines. Each node machine can then run its own allocation of tests. This allows you to run a large suite of tests very quickly.
4-
5-
### Running the Selenium Grid Hub
6-
7-
The following commands will work once you've installed seleniumbase, which comes with the seleniumbase console scripts interface.
8-
9-
Grid Hub server controls:
10-
```bash
11-
seleniumbase grid-hub {start|stop|restart} [OPTIONS]
12-
```
13-
Options:
14-
* ``-v``, ``--verbose`` (Increases verbosity of logging output.)
15-
16-
Grid node server controlls:
17-
```bash
18-
seleniumbase grid-node {start|stop|restart} --hub=[HUB_IP] [OPTIONS]
19-
```
20-
Options:
21-
* ``-v``, ``--verbose`` (Increases verbosity of logging output.)
22-
* ``--hub=[HUB_IP]`` (Specifies the Grid Hub to connect to. Default: "127.0.0.1".)
23-
24-
When the Grid Hub Console is up and running, you'll be able to find it here: [http://127.0.0.1:4444/grid/console](http://127.0.0.1:4444/grid/console)
25-
26-
27-
#### More info about the Selenium Grid Hub can be found here:
28-
* [https://github.com/SeleniumHQ/selenium/wiki/Grid2](https://github.com/SeleniumHQ/selenium/wiki/Grid2)
29-
* [https://github.com/SeleniumHQ/selenium/wiki](https://github.com/SeleniumHQ/selenium/wiki/Grid2)
1+
### The ReadMe for the Selenium Grid Hub Launcher has been moved to: [seleniumbase/utilities/selenium_grid/ReadMe.md](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md) and all related code has been moved to [seleniumbase/utilities/selenium_grid](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid)

integrations/selenium_ide/ReadMe.md

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
## Converting Katalon/Selenium IDE recordings into SeleniumBase test scripts
2-
3-
[Katelon Recorder / Selenium IDE](https://www.katalon.com/resources-center/blog/katalon-automation-recorder/) (<i>the successor to the [old Selenium IDE](http://docs.seleniumhq.org/projects/ide/)</i>) 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/). Katelon 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.
4-
5-
#### Step 1: Make a recording with Katelon Recorder
6-
7-
![](https://cdn2.hubspot.net/hubfs/100006/images/katalon_recorder_2.png "Katelon Recorder example")
8-
9-
#### Step 2: Export your recording as a Python 2 Webdriver script
10-
11-
* ``{} Export`` => ``Python 2 (WebDriver + unittest)`` => ``Save As File``
12-
13-
#### Step 3: Drop your exported file into the ``selenium_ide`` folder
14-
15-
* Just copy & paste!
16-
17-
(The full path of the folder is ``SeleniumBase/integrations/selenium_ide``)
18-
19-
#### Step 4: Run ``convert_ide.py`` on the exported Python script
20-
21-
```bash
22-
python convert_ide.py [MY_TEST.py]
23-
```
24-
25-
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.)
26-
27-
#### Step 5: Enjoy your new clean & reliable SeleniumBase test script
28-
29-
* You can now copy your new SeleniumBase test script into your test suite. It's ready to be run!
1+
### 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)
File renamed without changes.

console_scripts/run.py renamed to seleniumbase/console_scripts/run.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"""
1414

1515
import sys
16-
from console_scripts import sb_mkdir
17-
from console_scripts import sb_install
18-
from integrations.selenium_grid import grid_hub
19-
from integrations.selenium_grid import grid_node
20-
from integrations.selenium_ide import convert_ide
16+
from seleniumbase.console_scripts import sb_mkdir
17+
from seleniumbase.console_scripts import sb_install
18+
from seleniumbase.utilities.selenium_grid import grid_hub
19+
from seleniumbase.utilities.selenium_grid import grid_node
20+
from seleniumbase.utilities.selenium_ide import convert_ide
2121

2222

2323
def show_usage():

0 commit comments

Comments
 (0)