Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Have you ever thought some college work can be automated using python? Rather th
This repository is for all Python enthusiasts who have a keen interest in automating the web browser using Python commands. No previous knowledge is required. This repository will be useful for all the students who are not familiar with python as well as for those students who want to test their technical skills with hand-on-projects to solve complex and real-world problems. In this repository you will be going to learn about the new concept of how to use python commands for web automation, which is useful for testing, scraping data, getting concert tickets, filling in tedious forms using selenium. As a result, you will increase your knowledge and gain expertise in troubleshooting and debugging, python programming and version control. Moreover, this workshop is informative and fun.

# Websites
[Selenium data](https://selenium-python.readthedocs.io)
[Selenium Docs](https://selenium-python.readthedocs.io)


# Tools Needed
Selenim -
Selenium -
Windows
``` py
pip install selenium
Expand All @@ -37,16 +37,18 @@ sudo pip3 install selenium
```

# Web Driver Install
[Web Driver](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/)
[brew link](https://formulae.brew.sh/cask/chromedriver)

Browser based setup
Firefox: firefoxdriver = webdriver.Firefox(executable_path=”Path to Firefox driver”)<br />
Chrome:``` chromedriver = webdriver.Chrome(executable_path=”Path to Chrome driver”) ```<br />
Internet Explorer: ```iedriver = webdriver.IE(executable_path=”­Pat­h To­ IEDriverServer.exe”) ```<br />
Edge: ```edgedriver = webdriver.Edge(executable_path=”­Pat­h To­ MicrosoftWebDriver.exe”)```__
Opera: ```operadriver = webdriver.Opera(executable_path=”­Pat­h To­ operadriver”)```__
[Web Driver](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/)</br>
[Brew link](https://formulae.brew.sh/cask/chromedriver)

# Browser based setup
```
Firefox: firefoxdriver = webdriver.Firefox(executable_path=”Path to Firefox driver”)
Chrome: chromedriver = webdriver.Chrome(executable_path=”Path to Chrome driver”)
Internet Explorer: iedriver = webdriver.IE(executable_path=”­Pat­h To­ IEDriverServer.exe”)
Edge: edgedriver = webdriver.Edge(executable_path=”­Pat­h To­ MicrosoftWebDriver.exe”)
Opera: operadriver = webdriver.Opera(executable_path=”­Pat­h To­ operadriver”)
Safari: SafariDriver now requires manual installation of the extension prior to automation
```

# Properties of WebDriver class
```
Expand Down Expand Up @@ -125,19 +127,20 @@ select_by_value(value) -> This selects all the options that have a value matchin
select_by_visible_text(text) -> This selects all the options that display the text matching the argument from the dropdown or list.
```

#Alert class
# Alert class
Properties of the Alert class
```
text -> This gets text from the alert window
```
#Methods of the Alert class
# Methods of the Alert class
```
accept() -> This will accept the JavaScript alert box that is click on the OK button.
dismiss() -> This will dismiss the JavaScript alert box that is click on the Cancel button.
send_keys(*value) -> This simulates typing into the element.
```
#Browser Arguments
–headless
# Browser Arguments
```
– headless
To open browser in headless mode. Works in both Chrome and Firefox browser
–start-maximized
To start browser maximized to screen. Requires only for Chrome browser. Firefox by default starts maximized
Expand All @@ -146,3 +149,4 @@ To open private chrome browser
–disable-notifications
To disable notifications, works Only in Chrome browser
http://allselenium.info/python-selenium-commands-cheat-sheet-frequently-used/
```