Skip to content

mohitpeshwani/Selenium_driver_with_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Driver with the Python from scratch with examples

Need to install

Python
Selenium ------------------> pip instll selenium
Chromedriver--------------->https://chromedriver.chromium.org/getting-started


Selenium basics 1

(i) basics of the selenium web driver small commands
(ii) minimize and maximise the functionality


Selenium basics 2

Navigation commands mainly use to move previous page(<-) and forward page(->) page (i) driver.back()
(ii) driver.forward()


Selenium basics 3

Demonstrating the condtional function is_selected, is_enabled, is_displayed() mainly for validation purpose
(i) is_enabled()
(ii) is_selected()
(iii) is_displayed()


Selenium basics 4

Demonstrating the Waits in selenium web driver

Explicit Wait command, the WebDriver is directed to wait until a certain condition occurs before proceeding with executing the code. Setting Explicit Wait is important in cases where there are certain elements that naturally take more time to load
Implicit Wait directs the Selenium WebDriver to wait for a certain measure of time before throwing an exception. Once this time is set, WebDriver will wait for the element before the exception occurs


Selenium basics 5

Input Box And Text Box fucntionality using selenium driver

(i) send_keys() to add the message or input into input_box/textarea
(ii) submit button to submit.


Selenium basics 6

In this web page we will select the checkbox and radio types of input using
element.click()
And also check whenever there is a iframe we need to go into iframe using (optional)(Note: we are selecting radio buttons in frame that's why required to go iframe)
(i)switch_to.frame('frame_id') --> to select the elements in the specific sections
(ii)switch_to.default_content() --> switch to normal mode always is best practice
(This two are mostly used in the automation testing perspective. "In safty place like the tracsaction for ex, slack transcation they use nested iframes.)


Selenium basics 7

Lets select from the drop down plane with the help of the selenium web driver command by 3 ways as follow:
Step 1) Select the element using the element = select(driver.find_element())
Step 2) Select the value using the following three ways we have
(i)element.select_by_visible_text("")
(ii)element.select_by_value("")
(iii)element.select_by_index()


Selenium basics 8

''' We are trying to interact with the links and mainly simply we can get them using the By function

Let's getting the No of the links, all link text, partial link text so we get hands on find_elements function too.

another ways to find (i) By.LINK_TEXT --> complete text for single element
(ii) By.PARTIAL_LINK_TEXT --> partial text is enough for finding individual work
'''


Selenium basics 9

Let us check how we can handle the alerts and popups on the website using selenium websdrive in python
we can driver.switch_to.alert()
where multiple things there accept using .accept()
where multiple things there accept using .dismiss()
another ways to find
(i) By.LINK_TEXT --> complete text for single element
(ii) By.PARTIAL_LINK_TEXT --> partial text is enough for finding individual work '''


Selenium basics 10

Handling the Windows tab using selenium webdriver with Python

Basics which is necessary to understand.


Selenium basics 11

handle the scroll in a web page using the python with selenium


Selenium basics 12

handle the mouse hower or touch on mobile screen actions through the selenium web driver commands

Selenium basics 13

Double Click action using mouse handling on python selenium

Selenium basics 14

perform some more functionality around ActionChain

Connect with me:

mohit peshwani coding_nightmare mohit peshwani

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages