Sikuli Overview

Sikuli is a Desktop Automation library. This library “sikulixapi.jar” can be imported to any Java Selenium project to automate any desktop app or popup.
Sikuli uses “Screen” Class and it has lots of methods to support GUI interactions.E.g. Screen s = new Screen();s.click(“imageOfButton.png”);Note: Store imageOfButton.png at java root project folder.
Similarly you could do type, doubleClick, find etc methods provided by Screen class.
Sikuli automation is very simple and can be used to replace many day today tasks on outlook, windows software center installation. With that said sikuli can replace some of the robotic process automation done by many tools like Automation Anywhere, UiPath etc.

What is Sikuli Screen, Region, Pattern ?

Sikuli Screen is a class that has lots methods like click, double click, find etc to interact desktop GUI images.

Region class is to target a rectangular area location on GUI using x,y coordinates and width and height to locate the rectangular area.

Pattern class used for image level scanning support

Sikuli Architecture:

Sikuli scripts have Java library that takes care of mouse and keyboard actions using java.awt.Robot. Apart from this, Sikuli using OpenCV library which is C++ engine connected to Java via JNI. OpenCV is a computer Vision and machine learning library used for image recognition.

What is JNI

JNI is Java Native interface, it is java programming interface used to bridge the Java and other non java programming language like C, C++ application/programming frameworks

Angular Overview

  • Angular Overview
  • Angular Setup – build your first project !
  • TypeScript Overview (coming soon)
  • Data binding
    • Event binding
    • Two way data binding
    • Interpolation
    • Property binding
  • First TypeScript Program
  • Variable Declaration
  • Type Assetions
  • Arrow Functions
  • Interfaces
  • Classes
  • Objects
  • Properties
  • Modules
  • Constructors
  • Access Modifiers

Angular Overview

Angular development framework is introduced by Google and currently millions of developers are using it. Releases started with AngularJs and then Angular2 , Angular4 and going on.AngularJS to Angular2 is major change.
Native support of Typescript from Microsoft make coding faster and maintainable. Native support from testing tools like Karma and Protractor making this as number 1 choice for dynamic web app automation.

What is NgModules in Angular?

NgModules are Angular class from Angular/core and helps to build modules in Angular application development.

For e.g. you wanted to develop a complex application where many modules are needed for easy implementation. Each module acts like mini application like cart module, creditCard module, etc.

so NgModules combines browser modules, other modules that you develop, decoration, bootstrap etc.

NgModules has declration , import, providers, bootstrap arrays.

Angular Setup

  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 (optional)
  7. go to project folder ” my-newweb-app ” via commandline itself
  8. type ng serve -o

Data Binding

Data binding makes the angular applications development very easy.

Data binding helps to do the data synchronization between the template(view/html) and class(typescript code)

There are 4 types of data binding in Angular and are following,

  • Event binding
  • Two way data binding
  • Interpolation
  • Property binding

What is Interpolation?

For interpolation, double curly braces are used in the template as below,

// app.html is the example for interpolation

<p>{{ name }}</p>  

and it stores the variables, then angular checks for the variable and updates the value assigned to the text.

The Typescript app.ts as below to display the name value to app.html.

// app.ts

@Component({
  templateUrl: 'app.html',
  selector: 'app-test',
})
export class AppComponent {
  name = 'Sharath C';
}

What is Property binding?

Property binding helps to set the property of a view element and it uses [] syntax as below

// app.html is the simple for the property binding.

<button [disabled]="buttonIsDisabled"></button>

TypeScript has to be coded as below to pass the property binding to view template. refer the app.ts as example for Typescript passing the property value

// app.ts
@Component({
  templateUrl: 'app.html',
  selector: 'app-test',
})
export class Component {
  buttonIsDisabled = true;
}

Building Angular Data Visualization using ngx-charts

ngx-charts is an open-source, declarative charting framework for Angular projects to build very simplified yet powerful reporting.

Angular will do all rendering and ngx-charts module supports different chart types like bar charts, pie charts, line charts, heatmap, treemap etc, altogether this combo will be useful for any Angular Data visualization projects.

What is Protractor testing framework

Protractor is a test framework mainly intended for Angular and AngularJS applications.

During Protractor execution you no longer need to add waits specifically to wait for your next test. Protractor can automatically execute the next step in your test the moment the webpage finishes pending transaction.

Protractor expected condition setting code sample below:

var expectedCondition = protractor.ExpectedConditions; var elementOne = element(by.id(‘UserId’)); browser.wait(expectedCondition.presenceOf(elementOne), 10000); expect(elememtOne.isPresent()).toBeTruthy();

Protractor vs Selenium

Protractor vs Selenium

Protractor is a test framework mainly intended for Angular and AngularJS applications. Where as Selenium is developed for any Web Browser Automation. 

During Protractor execution you no longer need to add waits specifically to wait for your next test. Protractor can automatically execute the next step in your test the moment the webpage finishes pending transaction, but in selenium webpage sync has to be coded.

What is Julia

Julia is a programming language suited for Machine Learning. Julia has got lot of advantages compared to Python when it comes to Machine learning. 
Julia is compiled at run time and it uses Just in Time compiler and it is fast compiling.  Julia’s multiple dispatch very is fast and polymorphic dispatch allows for applying function definitions as properties of a struct.
Julia is specifically made for ML and statistics. Also if you check linear algebra,  Julia out performs than Python. For math related operations,  Julia works like R programming language and shows better performance than Python.

What is Selenoid

What is Selenoid ?

Selenoid is an alternative solution for Parallel Selenium test execution when you are not looking for Selenium Grid or Docker selenium.

Like the way Docker selenium out perform over selenium grid, Selenoid also has the advantage over selenium grid being dockerized.

Selenoid has successful implementation of docker containers to kick start browser tests. It provides fresh environment for each test.

In selenoid tests, containes starts with test and getting removed with test execution ends. This gives good performance for this design.

as first step of configuration , you may need to install docker and run selenoid on docker containers. Selenoid-ui is used to track test execution gui mode.

How to Validate the XPATH is correct in Selenium automation

How to validate XPath?
In console type $x(“paste xpath here”) and enter. Result should show the correct element pointing to the xpath.For css, try with $(“paste css here”)
Customized XPath
From html code, we can create XPath and validate.
\\tagName[@attribute=‘value]
Css can created using below formula from html code.
tagName[attribute=‘value’]
Mouse interactions- Actions Class
create an object and use moveToElement and build().perform() method

What is PyTorch

PyTorch is Python based scientific library meant to provide a deep learning platform and also to replace NumPy. 
PyTorch is developed by Facebook.
PyTorch is leveraged by researchers , AI developers and students.
PyTorch offers an easy to Use interface for APIs and also easily integrates with python data science stack.
PyTorch also provides dynamic computational graphs.
Now How to Install PyTorch:
Step 1. Install Anaconda
Step 2. Open Anaconda Command Prompt 
Step 3. conda install pytorch -c pytorch
Step 4. Pip install torchvision and add environment to ipykernel