Constructor
new module:WPAdminWCSettingsTaxRates(driver, args)
Parameters:
Name | Type | Description |
---|---|---|
driver |
WebDriver | Instance of WebDriver. |
args |
object | Configuration arguments. |
Extends
- WPAdminWCSettings
Methods
checkCompound(row) → {Promise}
Check the "Compound" checkbox.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number of checkbox. |
Returns:
Promise that evaluates to true
if box is/gets checked successfully, false
otherwise.
- Type
- Promise
checkShipping(row) → {Promise}
Check the "Shipping" checkbox.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number of checkbox. |
Returns:
Promise that evaluates to true
if box is/gets checked successfully, false
otherwise.
- Type
- Promise
getSelector(row, childEl) → {object}
Get the selector for an element in the tax rate form.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number element is in. |
childEl |
string | An optional CSS selector to look for inside the row. Default: '' |
Returns:
selector
- Type
- object
insertRow() → {Promise}
Click the "Insert Row" button.
Returns:
Promise that evaluates to true
if button gets clicked successfully, false
otherwise.
- Type
- Promise
removeRow(row) → {Promise}
Remove a row.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to remove. |
Returns:
Promise that evaluates to true
if row removed successfully using UI, false
otherwise.
- Type
- Promise
removeSelectedRows() → {Promise}
Click the "Remove Selected Row(s)" button.
Returns:
Promise that evaluates to true
if button gets clicked successfully, false
otherwise.
- Type
- Promise
setCity(row, value) → {Promise}
Set the City field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | City. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
setCountryCode(row, value) → {Promise}
Set the Country Code field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | Country code. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
setPriority(row, value) → {Promise}
Set the Priority field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | Priority. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
setRate(row, value) → {Promise}
Set the Rate % field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | Rate %. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
setStateCode(row, value) → {Promise}
Set the State Code field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | State code. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
setTaxName(row, value) → {Promise}
Set the Tax Name field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | Tax name. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
setZipCode(row, value) → {Promise}
Set the Postcode/Zip field.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number to set field for. |
value |
string | Zip or postal code. |
Returns:
Promise that evaluates to true
if set successfully, false
otherwise.
- Type
- Promise
uncheckCompound(row) → {Promise}
Uncheck the "Compound" checkbox.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number of checkbox. |
Returns:
Promise that evaluates to true
if box is/gets unchecked successfully, false
otherwise.
- Type
- Promise
uncheckShipping(row) → {Promise}
Uncheck the "Compound" checkbox.
Parameters:
Name | Type | Description |
---|---|---|
row |
int | Row number of checkbox. |
Returns:
Promise that evaluates to true
if box is/gets unchecked successfully, false
otherwise.
- Type
- Promise