How to handle Webtable in Selenium

Simple way to handle Webtable in Selenium Web Automation

Steps/coding/dom inspecting logic:

  1. Right Click and Inspect html for table
  2. Identify the patern for colum 1 of table
  3. Carefully observe the xpath of column 1 row 1 to row 3
  4. Notice that xpath has “tr[1]/td[1]”, “tr[2]/td[1]” , “tr[3]/td[1]” etc for following rows in colmn 1
  5. Use For loop and replace tr[1],tr[2],tr[3] with for loop variable “i”

What is contract testing

What is contract testing?

Contract testing is famous in microservices world. When we consider less numbers of microservices,  then contract testing is not so necessary.However when you look at the Amazon or Netflix microservices mesh, it is countless. Such cases it is extremely difficult for developer or tester to maintain unit/automation test suite as per the microservices development chnages.
Contract testing is the best possible solution currently offered for this situation. In contract testing, a mocked service is created to represent the provider.  There are commercial or opensource tools available to stimulate this. In short, contract is set of predefined requests and responses created by automation or developer team to do their testing.

How to read pdf content in java for automation project

How to read pdf content in java?

Apache PDFBox and FontBox jar available can be useful here. Add these two libraries to your Maven Pom.xml or build.gradle dependencies.
Then write java code to parse your PDF files to create POJOs.
What is POJO in javaPOJO stands for Plain java object and it has not restrictions or class path dependency.

What is google App Engine

What is Google’s App Engine ?

Google provides platform as service or PaaS via Google’s App Engine.App Engine is a cloud computing platform where development and hosting of applications can be done.Other feature is App engine scales up on demand basis when the requests are more.
App Engine supports almost all development technologies like Go, Java , Python, .NET, ruby.
Python web frameworks like Flask, Django all can run on App Engine.

How to setup angular project

How to setup Angular project and generate components ?

  1. install latest nodejs from nodejs.org
  2. Go to git bash/powershell ISE/CMD
  3. type following commands,
  4. install Angular : npm install -g @angular/cli
  5. ng new my-newweb-app
  6. ng g c myFirstModule or type mg generate component myFirstModule (optional)
  7. go to project folder ” my-newweb-app ” via commandline itself
  8. type mg serve -o

Other programming notes

select [(ngModel)]=”value” (change)=”selected()”

option *ngFor=”let item of data” [ngValue]=”item”>{{item.name}}</option
</select

selected(){
alert(this.value.name)
}

data:Array = [
{id: 0, name: “Test “},
{id: 1, name: “Test2”}
];

div>  <input ref-email placeholder=”text here” />  </div

What is ELK

What is ELK (Elastic search, Logstash, Kibana) ?

ELK stack is a combination of 3 open-source products as below,

  1. Elasticsearch, a search and analytics engine.
  2. Logstash, that index the data to Elasticsearch. Logstash has a config file that has input,filter and output section. Config file looks like json file.
  3. Kibana, a visualization tool which provides a web based GUI for a user. User can design the bar, plot reporting charts.
    In order to make Kibana and Elasticsearch interact, you need to make both server up and running. Then logstash will index the data to Elasticsearch. 
    Then Kibana would read the data from Elasticsearch and visualize it.