• About
  • Contact me

Way 2 Webdev

Way 2 Webdev

Monthly Archives: March 2017

‘$’ selector in Protractor Locators (Selectors) and their references.

26 Sunday Mar 2017

Posted by Rajasekhar Kp in Uncategorized

≈ Leave a comment

This is a nice list to keep for reference somewhere:

Eg: $(‘#some-id’) :

The $ is not a jQuery selector, but a shorthanded version of element(by.css(‘#some-id’)). In this fashion, we’d be able to select elements by id, class and attributes:

$(‘#some-id’) // element(by.id())
$(‘.some-class’) // element(by.className())
$(‘tag-name’) // element(by.tagName())
$(‘[ng-message=required]’) // remember to leave out the double quotes around the value of attribute
$(‘#parent #child’) // select one child inside parent
$(‘ul li’) // select all children inside parent
$(‘ul li’).first() // select first of children
$(‘ul li’).last() // select last of children
$(‘ul li’).get(index) // select index-th of children

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’)); // only look through the elements with ng-binding attribute
element(by.buttonText(‘Save’)); // the whole of button text
element(by.partialButtonText(‘Save’)); // part of button text
element(by.cssContainingText(‘.pet’, ‘Dog’)) // for selecting this: <li class=”pet”>Dog</li>
element(by.deepCss(‘span’)) // for selecting all level of spans <span><span>x</span></span>

Reference : http://www.protractortest.org/#/

Advertisements

Getting Started with Bower Package Manager

25 Saturday Mar 2017

Posted by Rajasekhar Kp in Uncategorized

≈ Leave a comment

Tags

bower, grunt, gulp, NodeJS

Bower is a front-end package manager built by Twitter. Also known as a Package manager for the Web, bower is used in modern open source and closed source projects to solve many recurrent issues.

Bower has many of the benefits of other dependency managers. I’m sure there are others, but the benefits I’ve noticed so far include:

  • Simplify what might be called declarative dependency management; i.e. you declare your dependencies in bower.json so that other things can determine them easily
  • No need to commit dependencies to version control
  • Semantic versioning is used to help define a range of acceptable versions for a dependency, which makes it easy to update to newer versions within the defined range
  • No need to locate various builds (debug, minified, etc)
  • Simple to use different builds of a dependency for dev vs. prod
  • You can distribute the bower.json file and everyone can get up to speed with a simple “bower install”

Read more : https://www.codementor.io/bower/tutorial/beginner-tutorial-getting-started-bower-package-manager

Archives

March 2017
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Pages

  • About
  • Contact me

Topics

Uncategorized

Info

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.com
Follow Way 2 Webdev on WordPress.com
Advertisements

Follow me on Twitter

My Tweets

Top Clicks

  • None

Hours & Info

3999 Mission Boulevard,
San Diego CA 92109
1-202-555-1212
Lunch: 11am - 2pm
Dinner: M-Th 5pm - 11pm, Fri-Sat:5pm - 1am

Create a free website or blog at WordPress.com.