I want to achieve following algorithm:
Preconditions:
- You are logged in instagram web version
- You see the default home page
- You are using chrome
- It should be done via console tab in chrome
Task:
- Do in vanilla JS the focus of the input field with a recommendation window
i.e - Focus the field, input cats, submit it and see the recommendation window
let search = document.querySelectorAll('[placeholder="Поиск"]')[0];
search.focus();
search.click();
Expected behaviour:
- Search input found
- Search input focused
- Recommendation popup appeared
Actual behaviour:
- Search input found
- Search input not focused
Thank you for any assistance!