Skip to content

Commit 207443f

Browse files
rrrooommmaaaRoman Shevchenko
andauthored
Try to fix google chat live test (#5039)
* fix Javascript world error --------- Co-authored-by: Roman Shevchenko <[email protected]>
1 parent 1eac042 commit 207443f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

test/source/browser/controllable.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,9 @@ abstract class ControllableBase {
330330
} catch (e) {
331331
this.log(`wait_and_click(i${i}):6:err(${String(e)}):${selector}`);
332332
if (
333-
e.message === 'Node is either not visible or not an HTMLElement' ||
334-
e.message === 'Node is either not clickable or not an HTMLElement' ||
335-
e.message === 'Node is detached from document'
333+
['Node is either not visible or not an HTMLElement', 'Node is either not clickable or not an HTMLElement', 'Node is detached from document'].includes(
334+
e.message
335+
)
336336
) {
337337
// maybe the node just re-rendered?
338338
if (!retryErrs || i === 3) {

test/source/tests/page-recipe/oauth-page-recipe.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ export class OauthPageRecipe extends PageRecipe {
133133
}
134134
} catch (e) {
135135
const eStr = String(e);
136-
if (!eStr.includes('Execution context was destroyed') && !eStr.includes('Cannot find context with specified id')) {
136+
if (
137+
!eStr.includes('Execution context was destroyed') &&
138+
!eStr.includes('Cannot find context with specified id') &&
139+
!eStr.includes('Argument should belong to the same JavaScript world as target object')
140+
) {
137141
throw e; // not a known retriable error
138142
}
139143
// t.log(`Attempting to retry google auth:${action} on the same window for ${email} because: ${eStr}`);

0 commit comments

Comments
 (0)