formcontrolname="legalName" formcontrolname="inn" formcontrolname="kpp" formcontrolname="legalAddress" formcontrolname="contactName" formcontrolname="phone" formcontrolname="email" lets start from begning , i dont want to use content.js , only popup.js , this is the current app , its working perfectly , please add function to select
Не гарантийный
Goodwill
and this how html changed after i select 1st option "Не гарантийный" :
×Не гарантийный
attepms: const input = document.querySelector('evo-autocomplete[formcontrolname="serviceTypeId"] input'); input.value = 'Не гарантийный'; input.dispatchEvent(new Event('input', {bubbles: true})); const input = document.querySelector('evo-autocomplete[formcontrolname="serviceTypeId"] input'); input.focus(); input.dispatchEvent(new KeyboardEvent('keydown', {key: 'ArrowDown', code: 'ArrowDown', keyCode: 40, which: 40, bubbles: true})); setTimeout(() => input.dispatchEvent(new KeyboardEvent('keydown', {key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true})), 200); Diag page: document.querySelector('a.info__no-data-btn.link').click(); //defect abnarushin const input = document.querySelector('evo-autocomplete[formcontrolname="diagnosticsResult"] input'); input.focus(); input.dispatchEvent(new KeyboardEvent('keydown', {key: 'ArrowDown', code: 'ArrowDown', keyCode: 40, which: 40, bubbles: true})); setTimeout(() => { input.dispatchEvent(new KeyboardEvent('keydown', {key: 'ArrowDown', code: 'ArrowDown', keyCode: 40, which: 40, bubbles: true})); setTimeout(() => input.dispatchEvent(new KeyboardEvent('keydown', {key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true})), 100); }, 100); const input = document.querySelector('evo-autocomplete[formcontrolname="componentId"] input'); input.focus(); for(let i = 0; i < 24; i++) { input.dispatchEvent(new KeyboardEvent('keydown', {key: 'ArrowDown', code: 'ArrowDown', keyCode: 40, which: 40, bubbles: true})); } setTimeout(() => input.dispatchEvent(new KeyboardEvent('keydown', {key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true})), 200); const input = document.querySelector('evo-autocomplete[formcontrolname="defectId"] input'); input.focus(); input.dispatchEvent(new KeyboardEvent('keydown', {key: 'ArrowDown', code: 'ArrowDown', keyCode: 40, which: 40, bubbles: true})); setTimeout(() => input.dispatchEvent(new KeyboardEvent('keydown', {key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true})), 200); const textarea = document.querySelector('evo-textarea[formcontrolname="comment"] textarea'); textarea.value = 'TAMPER'; textarea.dispatchEvent(new Event('input', {bubbles: true})); ////// PROBLEM in
×Не гарантийный