Skip to content

Commit

Permalink
fix: setInputFiles not supported on player
Browse files Browse the repository at this point in the history
  • Loading branch information
ruifigueira committed Sep 11, 2024
1 parent 76c87dc commit d1ea0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/recorder/crxPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default class Player extends EventEmitter {
if (action.name === 'fill')
return await innerPerformAction(mainFrame, 'fill', { selector, text: action.text }, callMetadata => mainFrame.fill(callMetadata, selector, action.text, { timeout: kActionTimeout, strict: true }));
if (action.name === 'setInputFiles')
return await innerPerformAction(mainFrame, 'setInputFiles', { selector, files: action.files }, callMetadata => mainFrame.setInputFiles(callMetadata, selector, { selector, payloads: [], timeout: kActionTimeout, strict: true }));
return await innerPerformAction(mainFrame, 'setInputFiles', { selector: action.selector, files: action.files }, () => Promise.reject(new Error(`player does not support setInputFiles yet`)));
if (action.name === 'check')
return await innerPerformAction(mainFrame, 'check', { selector }, callMetadata => mainFrame.check(callMetadata, selector, { timeout: kActionTimeout, strict: true }));
if (action.name === 'uncheck')
Expand Down

0 comments on commit d1ea0da

Please sign in to comment.