问题
is it possible to enter a text to the address bar in Chrome with Selenium? I would like to resolve domains and get the final URL. E.g. enter freshfruits.com resolves https://www.freshfruits.com.
回答1:
Selenium does not support sending keys to the browser address bar, unfortunately.
Someone suggested a solution with win32com.client
library here
Haven't tried it myself as I haven't been faced with this situation. The idea is you may need to consider workarounds, as this is outside the scope of Selenium.
来源:https://stackoverflow.com/questions/60396807/enter-text-into-the-chromes-address-bar-via-selenium