All java c# .net servlet jdbc c sqlserver android javascript php wcf clearcase angularjs 2

What are the Selectors in Protractor ?

Select / Locate an element with protractor

Protractor Selectors / Locators are key components that user must take time to learn and master. This article will show you some examples of various selectors.

Protractor Selectors allow you to find elements within your page, Selectors are passed to the “element” function. Then “element” function will locate and return the selector.

Element(by.<Selector>);  // <Selector> is a placeholder, pl. see below list of various selectors.

CSS based Selectors:

CSS is the lifeline of any web page to add various design attributes, like layout, color, formatting, etc.,

<div class = “cssClass” id =”idOfTheElement”>

                Var s1 = element(by.css(‘.cssClass’)); or $('.some-class')

                Var s2 = element(by.css(‘#idOfTheElement’)); or $('#some-id');

                Var s3 = element(by.css(‘div’)); or  $(‘div’);

                Var s4 = $('tag-name');

                Var s5 = $('[ng-message=required]');

                Var s6 = $('#parent #child');

                Var s7 = $('ul li');

                Var s8 = $('ul li').first();

                Var s9 = $('ul li').last();

                Var s10 = $('ul li').get(index);


Button and Link Selectors:

Button Selectors:

<button> buttonText </button>

Var button1 = element(by.buttonText(‘buttonText’);

Link Selectors:

                <a href=”#”> link text </a>

                Var link = element(by.linkText(‘link text));

Some other interesting ones:

Then we get the more interesting ones:

  • element(by.model('data'));
  • element(by.repeater('cat in pets'));
  • element(by.options('c for c in colors'))
  • element(by.binding('value'));
  • element(by.buttonText('Save'));
  • element(by.partialButtonText('Save'));
  • element(by.cssContainingText('.pet', 'Dog'));
  • element(by.deepCss('span'));
That looks like jQuery syntax but it is not, it's part of Protractor. That's why .children is throwing an error because we're not actually using jQuery. $ is a shorthanded version of element(by.css()) i.e. $('my-css'); is the exact same as element(by.css('my-css')); They also have $$ which is the same as element.all(by.css()) Despite the lack of documentation, it does not have to be used for chaining to find child elements. i.e. using Julie's protractor demo (I modified the example): describe('Protractor Demo App', function() { it('read the header', function() { browser.get(''); $('h3').getText().then(function (val) { console.log(val); }); }); }); That prints out the title of the h3 element that I located. The $ and $$ are simply a shorthand for css selectors.

A locator in Protractor is used to perform action on HTML dom elements. The most common and best locators used in Protractor are css, id, model and binding. For example commonly used locators are:


Multithreading in java

Java is a multi-threaded programming language which means we can develop multi-threaded program using Java. A multi-threaded program contains two or more parts that can run concurrently and each part can handle a different task at the same time making optimal use of the available resources specially when your computer has multiple CPUs.

Multithreading in java is a process of executing multiple threads simultaneously.

Thread is basically a lightweight sub-process, a smallest unit of processing. Multiprocessing and multithreading, both are used to achieve multitasking.

But we use multithreading than multiprocessing because threads share a common memory area. They don't allocate separate memory area so saves memory, and context-switching between the threads takes less time than process.

Java Multithreading is mostly used in games, animation etc.


1) It doesn't block the user because threads are independent and you can perform multiple operations at same time.

2) You can perform many operations together so it saves time.

3) Threads are independent so it doesn't affect other threads if exception occur in a single thread.

In this process we execute multiple threads simultaneously.Because thread is basically a lightweight sub-process, a smallest unit of processing.As we know Multiprocessing and multithreading, both are used to achieve multitasking purposes only.But we use multithreading than multiprocessing because threads share a common memory area. They don't allocate separate memory area so saves memory, and context-switching between the threads takes less time than process.And we use multithreading for animation,gaming etc.its major advantage is Threads are independent so it doesn't affect other threads if exception occur in a single thread and it can perform multiple operations at a time and saves our time to.

Why do we use jQuery?

  • Easy to use and learn.
  • Easily expandable.
  • Cross-browser support (IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)
  • Easy to use for DOM manipulation and traversal.
  • Large pool of built in methods.
  • AJAX Capabilities.
  • Methods for changing or applying CSS, creating animations.
  • Event detection and handling.
  • Tons of plug-ins for all kind of needs.

These are just a few reasons. But the bottom line is the jQuery is becoming the standard for DOM manipulation, simple effects, and much more.

  • Well maintained - Documentation, examples, it's all there.
  • Browser compatible - You don't worry about it.
  • Easy to learn - Spend more time coding!
  • Large community - The answer is always on Stack Overflow.
  • It's correct - It does a lot of small things correctly so you don't have to.
  • Extendable - Tons of community plugins for value.

Advantages of Rational ClearCase over other SCM tool i.e Microsoft Visual Source Safe

1. In ClearCase Check-in's are atomic.
2. Directories are first-class controlled entities in 
Clearcase. Even supports controlling of symbolic/hard links.

As with the ClearCase Bridge, you are continuing to use ClearCase for versioning, and are using RTC for change request management, task management, and planning.   With the Clearcase importer (either the Version Importer or the Baseline Importer), you are using RTC for versioning as well, and only using Clearcase for occasional access to archived versioned information that was not imported into RTC. In Clearcase performance is better supports more data size.

VSS Performance is poor and supports less data size.Directories are first-class controlled entities in clearcase. Even supports controlling of symbolic/hard links and The multisite is the best part of clearcase than any other 

In CLearcase performance is better supports more data size..

VSS Performance is poor and supports less data size.....

How to import CSS using system import in Angular JS 2.0?

you can call like following

@import 'MystleClass.css';

@Component({ templateUrl: 'card.html', styles: [` .card { height: 70px; width: 100px; } `], encapsulation: ViewEncapsulation.Native // encapsulation: ViewEncapsulation.None // encapsulation: ViewEncapsulation.Emulated is default })

What is the HTML tabindex attribute?

The tabindex global attribute is an integer indicating if the element can take input focus (is focusable), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values

n HTML5, the tabindex attribute can be used on any HTML element (it will validate on any HTML element. ... In HTML 4.01, the tabindex attribute can be used with: <a>, <area>, <button>, <input>, <object>, <select>, and <textarea>. Syntax. <element tabindex="number"> Attribute Values.

The tabindex attribute specifies the tab order of an element (when the "tab" button is used for navigating).

Rest API Authentication in Java

In token-based authentication, the client exchanges hard credentials (such as username and password) for a piece of data called token. Instead of sending the hard credentials in every request, the client will send the token to the server to perform authentication and authorization.

 in this RESTful services tutorial, we will see about how to do HTTP basic authentication. There are many ways to implement authentication in RESTful web services. HTTP basic authentication is the first step in learning security.

What is static polymorphism and dynamic polymorphism?


A method which will bind at compile time will execute in runtime is called as static polymorphism or early binding or compile time polymorphism


A method which will bind at compile time will not execute, instead of that a method which will bind at runtime will execute is called as RUNTIME


Static polymorphism:

The process of binding the overloaded method within object at compile time is known as Static polymorphism due to static polymorphism utilization of resources (main memory space) is poor because for each and every overloaded method a memory space is created at compile time when it binds with an object. In C++ environment the above problem can be solve by using dynamic polymorphism by implementing with virtual and pure virtual function so most of the C++ developer in real worlds follows only dynamic polymorphism.

Dynamic polymorphism:

In dynamic polymorphism method of the program binds with an object at runtime the advantage of dynamic polymorphism is allocating the memory space for the method (either for overloaded method or for override method) at run time.

Polymorphism means one name, multiple forms. It allows us to have more than one function with the same name in a program.It allows us to have overloading of operators so that an operation can exhibit different behaviours in different instances.

how to start the albd_server in windows if it is stopped? #clearcase

u can use below commands in command promt.
c:\>>>> net start albd.

and another way is 
Click Start > Control Panel
Double-click > Administrative Tools folder
Double-click >the Services icon
Double-click >Atria Location Broker service
and start albd.

one more is in conrol panel.there u can see the clearcase 
icon and double click on that icon.
click on services start up.
there u can see the albd status if albd service is stop
start albd service.

The troubleshooting steps below for each error are the culmination of different approaches that have been taken to solve the particular problem. The error is generic but the solutions are specific to the environment from which the problem occurs, therefore the steps below span multiple environments.

What is SAP BW/BI? What is the purpose of SAP BW/BI?

SAP BW/BI stands for Business Information Warehouse, also known as business intelligence. For any business, data reporting, analyses, and interpretation of business data is very crucial for running a business smoothly and making a decision. SAP BW/BI manage the data and enables to react quickly and in line with the market. It enables the user to analyze data from operative SAP applications as well as from other business.
SAP BI is similar to BW but it is more advanced. SAP BW was renamed as SAP BI from NetWeaver 7.0 onwards. BI came after BW 3.5. The main difference between BI and BW are BI has BI accelerator which boosts the query performance. It will be much faster. Uses transformation rules instead of update rules and transfer rules. BI allows real time data acquisition. SAP BO is mainly to analyse the data. It’s an analytical tool. BI/BW is where data, extracted from various applications, is sitting for further analysis... and BO is the front end tool that is used to analyze this data.