Skip to content

Commit

Permalink
fix getContext for playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
philkas committed Jul 25, 2023
1 parent fadeed9 commit e962a08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@ class Playwright extends Helper {
await this._evaluateHandeInContext(el => el.innerHTML = '', el);
}

highlightActiveElement.call(this, el, this.page);
highlightActiveElement.call(this, el, await this._getContext());

await el.type(value.toString(), { delay: this.options.pressKeyDelay });

Expand Down Expand Up @@ -1590,7 +1590,7 @@ class Playwright extends Helper {
async appendField(field, value) {
const els = await findFields.call(this, field);
assertElementExists(els, field, 'Field');
highlightActiveElement.call(this, els[0], this.page);
highlightActiveElement.call(this, els[0], await this._getContext());
await els[0].press('End');
await els[0].type(value.toString(), { delay: this.options.pressKeyDelay });
return this._waitForAction();
Expand Down Expand Up @@ -1636,7 +1636,7 @@ class Playwright extends Helper {
if (await el.getProperty('tagName').then(t => t.jsonValue()) !== 'SELECT') {
throw new Error('Element is not <select>');
}
highlightActiveElement.call(this, el, this.page);
highlightActiveElement.call(this, el, await this._getContext());
if (!Array.isArray(option)) option = [option];

for (const key in option) {
Expand Down Expand Up @@ -3063,7 +3063,7 @@ async function proceedClick(locator, context = null, options = {}) {
}

const element = els[0];
highlightActiveElement.call(this, els[0], this.page);
highlightActiveElement.call(this, els[0], await this._getContext());

/*
using the force true options itself but instead dispatching a click
Expand Down

0 comments on commit e962a08

Please sign in to comment.