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> buttonText </button>
Var button1 = element(by.buttonText(‘buttonText’);
<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.repeater('cat in pets'));
- element(by.options('c for c in colors'))
- element(by.cssContainingText('.pet', 'Dog'));
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.
ADVANTAGES OF MULTI THREADING:
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
What is the HTML tabindex attribute?
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 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
POLYMORPHISM (or) DYNAMIC POLYMORPHISM is nothing but LATE BINDING.
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.
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.