<small id='dfzw2'></small><noframes id='dfzw2'>

    <legend id='dfzw2'><style id='dfzw2'><dir id='dfzw2'><q id='dfzw2'></q></dir></style></legend>
  • <tfoot id='dfzw2'></tfoot>

        <bdo id='dfzw2'></bdo><ul id='dfzw2'></ul>

      <i id='dfzw2'><tr id='dfzw2'><dt id='dfzw2'><q id='dfzw2'><span id='dfzw2'><b id='dfzw2'><form id='dfzw2'><ins id='dfzw2'></ins><ul id='dfzw2'></ul><sub id='dfzw2'></sub></form><legend id='dfzw2'></legend><bdo id='dfzw2'><pre id='dfzw2'><center id='dfzw2'></center></pre></bdo></b><th id='dfzw2'></th></span></q></dt></tr></i><div id='dfzw2'><tfoot id='dfzw2'></tfoot><dl id='dfzw2'><fieldset id='dfzw2'></fieldset></dl></div>

      1. 我们可以在 python selenium webdriver 中缩放浏览器窗

        时间:2023-09-12

            <bdo id='BHXj6'></bdo><ul id='BHXj6'></ul>

              <tbody id='BHXj6'></tbody>
                  <legend id='BHXj6'><style id='BHXj6'><dir id='BHXj6'><q id='BHXj6'></q></dir></style></legend>

                1. <tfoot id='BHXj6'></tfoot>
                2. <i id='BHXj6'><tr id='BHXj6'><dt id='BHXj6'><q id='BHXj6'><span id='BHXj6'><b id='BHXj6'><form id='BHXj6'><ins id='BHXj6'></ins><ul id='BHXj6'></ul><sub id='BHXj6'></sub></form><legend id='BHXj6'></legend><bdo id='BHXj6'><pre id='BHXj6'><center id='BHXj6'></center></pre></bdo></b><th id='BHXj6'></th></span></q></dt></tr></i><div id='BHXj6'><tfoot id='BHXj6'></tfoot><dl id='BHXj6'><fieldset id='BHXj6'></fieldset></dl></div>
                3. <small id='BHXj6'></small><noframes id='BHXj6'>

                  本文介绍了我们可以在 python selenium webdriver 中缩放浏览器窗口吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试仅使用键盘放大和缩小 Chrome(硒网络驱动程序).我试过了--

                  I am trying to ZOOM IN and ZOOM OUT the Chrome( selenium webdriver) only using keyboard. I have tried --

                  from selenium.webdriver.common.keys import Keys
                  driver.find_element_by_tag_name("body").send_keys(Keys.CONTROL,Keys.SUBTRACT). 
                  

                  但它不起作用.需要python中的答案.

                  but it is not working. Need answer in python.

                  推荐答案

                  我只是在为此苦苦挣扎.我设法找到了对我有用的东西,希望它对你有用:

                  I was just struggling with this. I managed to find something that works for me, hopefully it works for you:

                  driver.execute_script("document.body.style.zoom='zoom %'")
                  

                  拥有 'zoom%' = 你想要的任何缩放级别.(例如67%")

                  Have 'zoom%' = whatever zoom level you want. (e.g. '67%')

                  这篇关于我们可以在 python selenium webdriver 中缩放浏览器窗口吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Selenium 无法在 CentOS 中启动 Chromedriver 下一篇:检测 Python 中的键输入

                  相关文章

                  最新文章

                  • <bdo id='dW6pu'></bdo><ul id='dW6pu'></ul>
                  <i id='dW6pu'><tr id='dW6pu'><dt id='dW6pu'><q id='dW6pu'><span id='dW6pu'><b id='dW6pu'><form id='dW6pu'><ins id='dW6pu'></ins><ul id='dW6pu'></ul><sub id='dW6pu'></sub></form><legend id='dW6pu'></legend><bdo id='dW6pu'><pre id='dW6pu'><center id='dW6pu'></center></pre></bdo></b><th id='dW6pu'></th></span></q></dt></tr></i><div id='dW6pu'><tfoot id='dW6pu'></tfoot><dl id='dW6pu'><fieldset id='dW6pu'></fieldset></dl></div>
                  <tfoot id='dW6pu'></tfoot>

                4. <legend id='dW6pu'><style id='dW6pu'><dir id='dW6pu'><q id='dW6pu'></q></dir></style></legend>

                    <small id='dW6pu'></small><noframes id='dW6pu'>