👽 Fix 'translate' method

master
KaKi87 1 year ago
parent c069a86a72
commit 2eae081af1
  1. 6
      index.js

@ -7,7 +7,7 @@ let browser;
const getBrowser = async () => {
if(browser) return browser;
browser = await puppeteer.launch();
browser = await puppeteer.launch({ args: ['--window-size=1920,1080'] });
browser.on('disconnected', () => browser = null);
return browser;
};
@ -24,8 +24,8 @@ module.exports = {
const
sourceLangSelect = '.lmt__language_select--source button',
targetLangSelect = '.lmt__language_select--target button',
sourceLangMenu = '.lmt__language_select_multicolumn_menu--source',
targetLangMenu = '.lmt__language_select_multicolumn_menu--target',
sourceLangMenu = '.lmt__language_select__menu_source',
targetLangMenu = '.lmt__language_select__menu_target',
sourceLangButton = `${sourceLangMenu} [dl-test=translator-lang-option-${sourceLanguage}]`,
targetLangButton = `${targetLangMenu} [dl-test=translator-lang-option-${targetLanguage}]`,
originalSentenceField = '.lmt__source_textarea',

Loading…
Cancel
Save