Enter text into the Chrome's address bar via Selenium

情到浓时终转凉″ 提交于 2021-01-28 19:58:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!