new ScrapBCA(user, pass, norek, args, useFingerprintInjector)
- Description:
Constructor for ScrapBCA class.
- Source:
Example
new ScrapBCA('sukianti1080','654321',true);
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
user |
string | BCA username. |
|
pass |
string | BCA password. |
|
norek |
string | BCA account number. |
|
args |
object | Additional arguments. |
|
useFingerprintInjector |
boolean |
false
|
Flag to use fingerprint injector. |
Methods
(async) checkIfReturnToLogin(page, selector) → {boolean}
- Description:
Checks if it returns to the login page.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
page |
Object | Page object. |
selector |
string | Selector to check. |
Returns:
- Returns true if it returns to the login page.
- Type
- boolean
(async) createTargetPage() → {Object}
- Description:
Creates a new target page (get new window).
- Source:
Returns:
- New page object.
- Type
- Object
(async) getStatement(tglawal, blnawal, tglakhir, blnakhir) → {Object}
- Description:
Gets the statement for a specified date range.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
tglawal |
number | Start date. |
blnawal |
number | Start month. |
tglakhir |
number | End date. |
blnakhir |
number | End month. |
Returns:
- Statement information. / if not set it will return latest statement
- Type
- Object
(async) handleDialogAndLogout(newPage)
- Description:
Handles dialog and logs out the page.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
newPage |
Object | New page object. |
(async) loginToBCA()
- Description:
Logs in to the BCA website.
- Source:
(async) logoutAndClose()
- Description:
Logs out and closes the session.
- Source:
(async) processGetBalance(page) → {Object}
- Description:
Processes getting the balance.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
page |
Object | Page object. |
Returns:
- New page object.
- Type
- Object
(async) selectAccountAndSetDates(tglawal, blnawal, tglakhir, blnakhir) → {Object}
- Description:
Selects account and sets date for transactions.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
tglawal |
number | Start date. |
blnawal |
number | Start month. |
tglakhir |
number | End date. |
blnakhir |
number | End month. |
Returns:
- New page object.
- Type
- Object