Selenium Python

  • /
  • Courses

Duration

20 Hours

Course Price

$ 399.00

4.5 (23)

Overview

Course Content

 

1) Automation

  • Benefits of Automation Testing
  • Various Tools Available in Market
  • Comparison between the tool

2) Automation Approaches

  • Tool Based
  • Framework Based
  • Record & Play
  • Modularization

3) Basics Of Python

  • Python Introduction
  • DataTypes
  • Looping Concepts
  • Conditional Statement
  • Concatenation Operator
  • Local & Global Variable
  • Static Variable
  • Object
  • Static & Non Static Concepts
  • Object Reference
  • Pass by Value
  • Pass by Reference
  • Constructor
  • Overloading
  • Self Keyword
  • What is Class?
  • Polymorphism
  • Inheritance
  • Overriding
  • Final Class
  • Interface
  • Abstraction
  • Encapsulation
  • Collections
  • List
  • Tuple
  • Set
  • Dictionary
  • Convert DataTypes
  • String To Integer
  • Integer to String

4) Python Unit Testing

  • Test Fixture

  • Test Case

  • Test Suite

  • Test Runner

  • Running Tests

  • Assertions

5) Selenium WebDriver

  • Command to Openurl in FireFox, Chrome, Internet Explorer

  • XPath

  • CSS Selector

  • Get All List from page

  • Implicit Wait

  • Explicit Wait

  • Window Handle

6) Read/Write Data

  • Read/ Write data in Text File
  • Read/Write data in Excel
  • Read Data from Property File

7) Automation Framework- Hands On

  • Types Of Framework
  • Linear Framework
  • Data Driver Framework
  • Keyword Driven
  • Hybrid Framework

8) Automation Framework- Advanced Hands On

  • Hybrid Framework
  • Keyword Driven Framework

9) Automation Scripts Creation –Live Project

  • Using Hybrid Framework

Trainer Profile

Interview Questions & Answer

 

1) What is Python? What are the benefits of using Python?

Python is a programming language. It includes objects, modules, threads, exceptions and automatic memory management. The benefits of pythons are that it is simple and easy, portable, extensible, build-in data structure. it is an open source automation tool.

 

2) What are Python decorators?

Python decorators is a specific change that we make in Python syntax in order to alter functions easily.

 

3) What is unittest in Python?

A unit testing framework in Python is known as unittest. It supports sharing of setups, automation testing, shutdown code for tests, aggregation of tests into collections etc.

 

4) How can you copy an object in Python?

In order to copy an object in Python, you can try copy.copy () or copy.deepcopy() for the general case. You cannot copy all objects but most of them.

 

5) Explain how to delete a file in Python?

We can delete a file in Python ,By using a command os.remove (filename) or os.unlink(filename)

 

6) Explain how can you access a module written in Python from C?

You can access a module written in Python from C by following method,

Module = =PyImport_ImportModule("");

 

7) Mention five benefits of using Python?

  • Easy-to-learn for beginners.

  • It Provide easy readability due to use of square brackets.

  • Python comprises of a huge standard library for most Internet platforms like Email, HTML, etc.

  • It  does not require explicit memory management as the interpreter itself allocates the memory to new variables and free them automatically

  • Having the built-in data types saves programming time and effort from declaring variables.

 

8) What is the syntax for “for” loop if we have to run for loop for 3 times?

  • Answer:

  • for 1 in 5:

  • Print(“)

 

9) What Is The Statement That Can Be Used In Python If The Program Requires No Action But Requires It Syntactically?

The pass statement is a null operation. Nothing happens when it executes. You should use “pass” keyword in lowercase. If you write “Pass,” you’ll face an error like “NameError: name Pass is not defined.” Python statements are case sensitive.

letter = "hai sethuraman"

for i in letter:
    if i == "a":
        pass
        print("pass statement is execute ..............")
    else:
        print(i)

10) What is The Process To Get The Home Directory Using ‘~’ In Python?

In order to get Home Directory , You need to import the os module, and then just a single line would do the rest.

import os

print (os.path.expanduser('~'))
 
Output:
/home/runner
 

11) Write A Reg Expression That Confirms An Email Id Using The Python Reg Expression Module “Re”?

Python has a regular expression module “re.”

Check out the “re” expression that can check the email id for .com and .co.in subdomain.

import re

print(re.search(r"[0-9a-zA-Z.]+@[a-zA-Z]+\.(com|co\.in)$","micheal.pages@mp.com"))

 

12) What Is A Function In Python Programming?

A function in Python Programming  is an object which represents a block of code and is a reusable entity. It brings modularity to a program and a higher degree of code reusability.

Python has given us many built-in functions such as print() and provides the ability to create user-defined functions.

 

13) What Does The *Args Do In Python?

We use *args as a parameter in the function header. It gives us the ability to pass N (variable) number of arguments.

Please note that this type of argument syntax doesn’t allow passing a named argument to the function.

Example of using the *args:

# Python code to demonstrate 

# *args for dynamic arguments 
def fn(*argList):  
    for argx in argList:  
        print (argx) 
    
fn('I', 'am', 'Learning', 'Python')
The output:
I
am
Learning
Python

 

14) What Does The **Kwargs Do In Python?

We can also use the **kwargs syntax in a Python function declaration. It let us pass N (variable) number of arguments which can be named or keyworded.

Example of using the **kwargs:

# Python code to demonstrate 

# **kwargs for dynamic + named arguments 
def fn(**kwargs):  
    for emp, age in kwargs.items(): 
        print ("%s's age is %s." %(emp, age)) 
    
fn(John=25, Kalley=22, Tom=32)
The output:
John's age is 25.
Kalley's age is 22.
Tom's age is 32
 

Blog

 

Python is a great language for test automation. If you are a manual tester and hasn’t done any programming before then focus on learning how to code before learning how to do automation. Once you have basic Python skills, then learn PyTest the most popular and arguably the best test framework for Python. You can also read python quick start guide by Bruno Oliveira. If you want to learn about Test-Driven Development with a Django app, then check out the goat book by Harry Percival.

 

Learn Python 3. Python 2 hit end of life on January 1, 2020. Some older projects may continue to use Python 2, but support for Python 2 is dead.

 

The most important tool for coding in any language is IDE. One can also use VS Code. it feels lightweight, but it provides all the things I need as a developer: syntax highlighting, running and debugging, Git integration, and a terminal in the same window. VS Code is also fully customizable.  PyCharm by JetBrains is also a great editor. PyCharm a bit heavier than VS Code, but it also has richer features. Both are fantastic choices.

Source control is another vital part of programming. Using a source control system like Git -maintains a history of your project.

 

Register For Online Demo


Can't read the image? click here to refresh