klassijs-astellen
v1.0.1
Published
Control all Global and Environment variables used in the Klassi-JS framework.
Readme
Klassijs-astellen
This is used to control all the Global and Environment variables that's used in klassi-js test framework as well as independently in your own framework/project.
Installation
pnpm add klassijs-astellenUsage
const { astellen } = require('klassijs-astellen');
// Set values
astellen.set('BROWSER_NAME', 'chrome');
astellen.set('activePageObject', setPageObject(tagFromCommandLine, pageObjectMap));
// Get values
const browserName = astellen.get('BROWSER_NAME');
const activePageObject = astellen.get('activePageObject');
// Check if key exists
if (astellen.has('BROWSER_NAME')) {
console.log('Browser name is set');
}
// Delete a key
astellen.delete('BROWSER_NAME');
// Print all stored values (useful for debugging)
astellen.print();
// Reset all values
astellen.reset();API Reference
set(key, value)- Store a value with the given keyget(key)- Retrieve a value by keyhas(key)- Check if a key existsdelete(key)- Remove a key-value pairprint()- Display all stored values in consolereset()- Clear all stored values
