Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBookKnight committed May 28, 2020
0 parents commit 81ba2f7
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Project exclude paths
/venv/
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/python_google.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Drivers/chromedriver
Binary file not shown.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# My Python Selenium Demo on Google page

## Step 1: Ensure correct dependencies are installed

See the attached *requirements.txt*

Quickly check if you can navigate to Google by scripting some navigational code. See *test_search.py*

### NOTES
If you're facing ChromeDriver issues, use the [DriverManager library](https://stackoverflow.com/questions/60806988/selenium-error-this-version-of-chromedriver-only-supports-chrome-version-81-m) so it automatically installs the latest driver.


22 changes: 22 additions & 0 deletions Tests/test_search.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
import time

# webdriver manager installs
driver = webdriver.Chrome(ChromeDriverManager().install())

driver.implicitly_wait(10)
driver.maximize_window()

driver.get("https://www.google.com/")

driver.find_element_by_name("q").send_keys("Google")

driver.find_element_by_name("btnK").click()

time.sleep(2)

driver.close()
driver.quit()

print("Test Completed")
13 changes: 13 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
certifi==2020.4.5.1
chardet==3.0.4
colorama==0.4.3
configparser==5.0.0
crayons==0.3.0
html-testRunner==1.2.1
idna==2.9
Jinja2==2.11.2
MarkupSafe==1.1.1
requests==2.23.0
selenium==3.141.0
urllib3==1.25.9
webdriver-manager==2.5.2

0 comments on commit 81ba2f7

Please sign in to comment.