InterviewSolution
| 1. |
What Are The Objects In Phantomjs? |
|
Answer» These are the following objects in PhantomJs: cookiesEnabled: It CHECK whether cookie are enable or not. It return true for yes otherwise false. Its default value is true. Syntax: phantom.cookiesEnabled cookies: It is used to get or set cookies from domain which are stored in Cookiejar. Cookie returns an OBJECT with all cookies available for the domain. Syntax: phantom.cookies libraryPath: It store the script path which are used by injectJs function. Syntax: phantom.libraryPath VERSION: It is a read-only property which return version of PhantomJS instance which are running. The details are return in an object ('major': 1,'minor': 7, 'patch': 0). Syntax: phantom.version scriptName: It is used to get current script name (this property has DEPRECIATED). Syntax: phantom.scriptName args: It contain the script name as its first element (this property has removed). Syntax: phantom.args These are the following objects in PhantomJs: cookiesEnabled: It check whether cookie are enable or not. It return true for yes otherwise false. Its default value is true. Syntax: phantom.cookiesEnabled cookies: It is used to get or set cookies from domain which are stored in Cookiejar. Cookie returns an object with all cookies available for the domain. Syntax: phantom.cookies libraryPath: It store the script path which are used by injectJs function. Syntax: phantom.libraryPath version: It is a read-only property which return version of PhantomJS instance which are running. The details are return in an object ('major': 1,'minor': 7, 'patch': 0). Syntax: phantom.version scriptName: It is used to get current script name (this property has depreciated). Syntax: phantom.scriptName args: It contain the script name as its first element (this property has removed). Syntax: phantom.args |
|