Skip to main content

Posts

Showing posts from 2019

Selenium WebDriver Cheat Sheet

Below are some important code samples for those who are willing to learn Selenium automation. Driver Initialization WebDriver driver ; driver = new ChromeDriver() ; driver = new FirefoxDriver() ; driver = new SafariDriver() ; driver = new InternetExplorerDriver() ; driver = new EdgeDriver() ; // Driver Profiling //Firefox //Load Firefox System. setProperty ( "webdriver.firefox.bin" , "path/to/driver" ) ; FirefoxProfile profile = new FirefoxProfile() ; //load with add-on File file = new File( "path/to/add-on" ) ; profile.addExtension(file) ; //profile settings (setting up desired capabilities) DesiredCapabilities capabilities= new DesiredCapabilities() ; capabilities.setCapability(FirefoxDriver. PROFILE , profile) ; WebDriver driver = new RemoteWebDriver(capabilities) ; //Chrome Options System. setProperty ( "webdriver.chrome.driver" , "/path/to/chrome/driver" ) ; ChromeOptions options = new ChromeOption...

Storage - Oracle Architecture

Logical Storage Blocks Data Block is the smallest unit of logical storage for a database object. Extents Extends is the next level of logical grouping in the database. An extent contains one or more database blocks. Segments The next level of logical grouping in a database in the segments. A segment is a group of extents from a database object that Oracle treats as a unit. Data Segments: Every table in the database resides in a single data segment, consisting of one or more extents. Index Segments:  Each index is stored in its own index segment. As with partitioned tables, each partition of a partitioned index is stored in its own segment. Temporary Segments:  When a user's SQL statement needs disk space to complete an operation such as a sorting operation that cannot fit in memory, Oracle allocates a temporary segment . Temporary segments exist only for the duration of SQL execution . Rollback Segments:   Rollback Segments only exists in the SYSTEM ...

Behavior Driven Development

Behavior Driven Development (BDD) is a development process that originally associated with Test-Driven Development (TDD).  BDD is written in a readable format in an understandable language for anyone involved in software development.  BDD Features Providing better readability and visibility.  Verifying the software against customer requirements.  Assure the implementation of the system is correct. Derives examples of different expected behaviors of the system. Uses examples as acceptance tests. Focus on customer requirements throughout the development. BDD Practice There are two practices in BDD:-  Specification by Example (SbE). Test-Driven Development (TDD). Specification by example (SbE) uses examples in conversation to illustrate the business rules and the behavior of the software.  This uses to have a better understanding for Business Analyst, Product Owners, Testers and the Developers to reduce the misunderstanding abou...

Scraping HTML Content using Python

To Scrape Data using python we are using BeautifulSoup python Package !pip install beautifulsoup4 As a first step we have to import the packages and html page that we need to scrape. In here I have used some static HTML content which was customized to scrape the data. #imports import requests from bs4 import BeautifulSoup #html HTML Sample Doing Data Science with Python Doing Data Science with Python Author: Eranda Kodagoda This will help to perform various data science activitied using python Modules Title Duration in minutes Getting Started 20 Setting Up Environment 40 Extracting Data 30 Exploring and Processing Data 45 Building Productive Model 45 To View the HTML using beautifulsoup we can use below code-lines and execute on python executor from IPython.core.display import display, HTML display(HTML(html_string)) To Print the HTML using beautifulsoup we can use below code-lines and execute on python executor ps=Be...