Skip to main content

Posts

Kubernetes - Architecture

  What is Kubernetes:      Kubernetes is an open source container orchestration system for automating application deployment,     scaling, self-healing, rolling update and roll back.   Architecture Diagram: Master Node / Control Plane components:     Kube API server     Scheduler     Controller Manager     etcd store 1. Kube API Server:  API server acts as a front-end to kubernetes cluster & exposes the kubernetes cluster API.  API server talks to worker nodes.  API server validates and configures data for the api objects which includes pods, service   replica-controllers, deployments etc.  Once request is validated, it stores the cluster data under etcd store. 2. Schedulers:   Scheduler assigns pods to nodes  Scheduler determines which nodes are free and can take a new load.   Scheduler also checks for constraints before placing the load on any nodes. 3. etcd...

Selenium Basic Commands.

Selenium Commands, Packages and Exceptions. Here I have selected few most frequently asked commands in the interview. Recommended way of Importing webdriver from selenium package. from selenium import webdriver. Once webdriver is imported then you are able to access the classes like this webdriver.Firefox webdriver.FirefoxProfile webdriver.Chrome webdriver.ChromeOptions webdriver.Ie webdriver.Opera webdriver.PhantomJS webdriver.Remote webdriver.DesiredCapabilities webdriver.ActionChains webdriver.TouchActions webdriver.Proxy To launch the application URL: driver = webdriver.Chrome driver.get('http://youtube.com') To get URL of the currently loaded page: driver.current_url To close the current window: driver.close() Exceptions in Selenium: Base Exception class: Selenium.common.exceptions selenium.common.exceptions.WebDriverException selenium.common.exceptions.InvalidElementStateException selenium.common.exceptions...

Selenium Xpath

XPath  XPath is abbreviated as XML Path.  Xpath is used to find the location of any element on the web page using HTML DOM structure. Basic format of XPath is : Xpath = //tagnanme[@attribute='value'] //  : Select current node. Tagname  : Tagname of the particular node. eg : input, img, div etc @   : Select attribute. Value   : Value of the attribute. Different locators are used to find the element on web pages accurately. ID  ClassName Name LinkText XPath CSSPath Types of XPath: Absolute XPath Relative XPath Absolute xpath: It is direct way to find the element right from the root element of the webpage. The disadvantage of the absolute xpath is that if there are any changes made in the path of the element then xpath gets failed. It begins with the single forward slash(/), which means you can select the element from the root node. example : html/body/div[1]/section/div[1]/div/div/div/div[1]/div/di...

Selenium - Architecture

Selenium Architecture: Here, we will learn about the overall selenium architecture. How communication happens from client library to browser and which are all the components involved between them. Architecture compromises of major four components namely Selenium Language Binding JSON Wire Protocol Browser Drivers Real Browsers 1. Selenium Language Binding: Various programming languages provide their own Rest API support for communicating to their respective browser drivers via JSON Wire protocol. python provides 'selenium ' as a client library which has all the rest API i mplementation  for communicating with browser drivers. Selenium is a third party library which does not come in python basic installation.  You need to install it via PIP command : pip install selenium driver = selenium.webdriver.Chrome('location of the chrome driver executable')  Above line returns one chrome browser session , where rest all browser relate...

Selenium - Basics

Selenium: Selenium is an open source automated testing Suite for web applications across different browsers and platforms. Selenium has 4 major components: Selenium Integrated Development Environment(IDE) Selenium Remote Control(RC) Web Driver Selenium Grid 1. Selenium Integrated Development Environment: Selenium IDE is the simplest framework in the Selenium Suite and very easiest to learn. It has got record playback and saving tests and inbuilt reporting tool.  2. Selenium Remote Control: Selenium RC was the flagship testing framework of the whole Selenium project for a long time. This is the first automated web testing tool where it allows users to use their programming language they prefer. RC comes in 2 forms: 2.1 Selenium Server:      Selenium Server receives selenium commands from your program, interprets them and reports  back the results of those running tests. Selenium Core is a Java Script program which execute...