astrolabe icon indicating copy to clipboard operation
astrolabe copied to clipboard

Get vs Value

Open justechn opened this issue 9 years ago • 0 comments

Sorry if this is answered somewhere in the docs, but I didn't see it.

What is the difference between the get: and value: ?

I pulled this from your own code https://github.com/stuplum/astrolabe/blob/master/lib/astrolabe/page.js

debug: { value: function() { this.context.debugger(); } },
title:      { get: function() { return this.context.getTitle(); } },

https://github.com/stuplum/astrolabe/blob/master/lib/astrolabe/base.js

by:           { value: protractor.By },
driver:       { get: function() { return browser; } },
exception:    { value: function(name) { return new exceptions.Exception(name); } },
findElement:  { value: function(by) { return this.context.findElement(by); } },
findElements: { value: function(by) { return this.context.findElements(by); } },

I don't see any consistent difference between their usage

justechn avatar Aug 13 '15 21:08 justechn