Some problems can occur:


Element id: Ensure that the id "MscrmControls.Containers.RelevanceSearchControl-text-input-props" is correct and has not been changed by other JavaScript code after the web page is loaded.
Timeout: Make sure you wait until the web page has finished loading before attempting to fill in the search box.
Error checking: Consider printing out the value of objcollection(i).id to ensure that you are selecting the correct element.
Check access: Sometimes accessing elements on a website requires access or authentication.
Check the above conditions to review and correct errors in your code.