Javascript dispatch new KeyboardEvent

I want to simulate keyboard typing for inputbox by JS:
first enter, than search button after entering name.
How can i simulate search button by JS?
grafik

I want to use JS without the elementbyID code for submit button.
Enter:
dispatchEvent(new KeyboardEvent('Enter', {key: 'Enter', keyCode: 13, code: 'Enter', which: 13 })); --> seams to work
Search:
dispatchEvent(new KeyboardEvent('BrowserSearch', {key: 'BrowserSearch', keyCode: 0, code: 'BrowserSearch', which: 0 }));

Where is the search term coming from?

What is the web page you are using ?

This is the page i want to enter

Taifun

i filled out the form according your tutorial. it works but i still get this message
grafik
grafik

From the tutorial

It looks like class1 does not exist on that webpage? Examine the source code of that page

Taifun