Selenium with Python
Installing Python,Selenium & Pycharm IDE
<Command Used>
where python
Command to :
list all the libraries already available with python
Install selenium
How to Run Tests on Chrome, Firefox & IE Browsers
Links
https://www.selenium.dev/downloads/
https://github.com/mozilla/geckodriver/releases
https://sites.google.com/a/chromium.org/chromedriver/
https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration
https://selenium-release.storage.googleapis.com/index.html?path=3.9/
- Code example: ...\SeleniumProject\MultiBrowser.py
- Code example: ...\SeleniumProject\basiccommands.py
WebDriver Navigational Commands
- Code example: ...\SeleniumProject\navigationcommands.py
WebDriver Conditional Commands
- Code example: ...\SeleniumProject\conditionalcommands.py
WebDriver Implicit wait
It is time based
WebDriver Explicit wait
- It is Condition based
- Expected Conditions
https://selenium-python.readthedocs.io/waits.html
Code example: ...\SeleniumProject\Explicitwait.py
Working with Input box/Test Box
Code example: ...\SeleniumProject\InputBoxes.py
Working with Radio buttons and Check boxes
Code example: ...\SeleniumProject\RadioButtonAndCheckboxes.py
Working with Drop-down list
- Code example: ...\SeleniumProject\Dropdown.py
Working with Links | Operations on Web Links | Handling Links
Code example: ...\SeleniumProject\Links.py
How to handle Alerts/Popups || Switching to Alerts/Popups
How to handle Frames/iFrames | Switch between the frames
How to handle Browser Windows | Switch between the Windows
Options available for closing windows/ browsers:
driver.quit()
driver.close()
using handles/ titles
- Code example: ...\SeleniumProject\Windows.py
Working with HTML/Web Table
- Code example: ...\SeleniumProject\Table.py
How to Scroll Web Pages in Selenium
Handle Mouse Actions |
1. Mouse Hover Action
- Code example: ...\SeleniumProject\MouseHover.py
2. Double click Action- Code example: ...\SeleniumProject\DoubleClick.py
3. Right Click Action- Code example: ...\SeleniumProject\RightClickAction.py
4. Drag and Drop- Code example: ...\SeleniumProject\DragAndDrop.py
How to upload Files
How to Download Files using Chrome Browser
How to Download Files using Firefox Browser
How to read data from MS-Excel using OpenPyXL | Data Driven TestingHow to write data into Excel using OpenPyXL | Data Driven Testing
Data Driven Testing using Microsoft Excel + OpenPyXL Module- Code example: ...\SeleniumProject\DataDrivenTestCase.py
Working with Cookies- Code example: ...\SeleniumProject\Capturescreen.py
Logging | Generate log file
Python UnitTest FrameworkPython UnitTest Framework MethodsPython UnitTest | Skipping TestsPython UnitTest|Assertions|assertEqual & assertNotEqual- Code example: ...\SeleniumProject\AssertionTest1.py
Python UnitTest|Assertions|assertTrue & assertFalse
Python UnitTest|Assertions|assertIsNone & assertIsNotNone
Python UnitTest|Assertions|assertIn & assertNotIn
Python UnitTest|Assertions|Relational comparison
Python UnitTest |Creating and Running Test Suites | Batch Testing
- Code example: ...\SeleniumwithPython\Package1\TC_LoginTest.py
- Code example: ...\SeleniumwithPython\Package1\TC_SignupTest.py
- Code example: ...\SeleniumwithPython\Package2\TC_PaymentTest.py
- Code example: ...\SeleniumwithPython\Package2\TC_PaymentReturns.py
- Code example: ...\SeleniumwithPython\TestSuites\All_TestSuites.py
PyTest | Installation and Getting Started
- Code example:
- ...\\SeleniumwithPython\test_pytestdemo1.py
- ...\SeleniumwithPython\test_pytestdemo2.py
PyTest | Run Multiple Tests in PyTest
- Function within a class is called method
- Code example:
- ...\\SeleniumwithPython\Test_orange_htm_logintest.py
- Use command on the terminal or command prompt to generate reports
<cont from 32 mins. Copy updated screenshot>
Oracle Database Connectivity using cx_Oracle |Data Driven Testing
PyTest HTML Report Generation | pytest-html module
How To Generate Allure Reports in Selenium with Python & PyTest
<Upload the code to GIT>
Comments
Post a Comment