Home > Python

Select value from drop-down in Selenium using Python

Sometimes we need to select a value from drop down in selenium. This drop down list can be of country, state, city etc.. In selenium using python, we can select values from drop-down using following sample code snippet: [crayon-62ba2b846f6a7271592142/] Decoding code 1. from selenium import webdriver:  This line states that, from selenium module/library webdriver

This Article is TAGGED in . Read more

How to handle alerts – prompts in Selenium using Python

Alerts are used to show success, failure messages. Most of the times while automating applications there are situations to handle Alerts. Below are the few methods in selenium for handling alerts: accept() dismiss() text Below is the code snippet in selenium using python: [crayon-62ba2b846fb1e700758886/] Decoding code 1. from selenium import webdriver:  This line states that, from selenium module/library

This Article is TAGGED in . Read more

Python sample programs – Part 1

  1. Calculate the Average of Numbers in a Given List [crayon-62ba2b846fe10642988350/] 2. Exchange the Values of Two Numbers Without Using a Temporary Variable [crayon-62ba2b846fe16794576130/] 3. Reverse a Given Number [crayon-62ba2b846fe1a779615557/] 4. Check Number is Positive or Negative [crayon-62ba2b846fe1c966810230/] 5. Take in the Marks of 5 Subjects and Display the Grade [crayon-62ba2b846fe1f886741522/] 6. Print all Numbers in a Range Divisible by

This Article is TAGGED in . Read more

Lists in Python

List is the most commonly used collection in Python. It is used to store list of variables which may have different data types. It is also useful to implement stacks and queues data structures. Variables can be dynamically stored using Lists. Following are some features of list 1. Lists are written with

This Article is TAGGED in , . Read more