小编Kaz*_*azi的帖子

为什么 switch_to_window() 方法不适用于 Python 中的 selenium webdriver?

我正在尝试使用 Python selenium webdriver 切换到新打开的窗口。代码之前运行良好,但现在显示错误。令人惊讶的是,Python 无法识别 switch_to_window() 方法,并且没有可供访问的声明。

def process_ebl_statements(self, account_number):

    current_window = self.driver.current_window_handle
    all_windows = self.driver.window_handles

    print("Current window: ", current_window)
    print("All windows: ", all_windows)
    number_of_windows = len(all_windows)
    self.driver.switch_to_window(all_windows[number_of_windows - 1])
Run Code Online (Sandbox Code Playgroud)

错误详情:

'WebDriver' object has no attribute 'switch_to_window'
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

python selenium webdriver webautomation selenium-webdriver

4
推荐指数
1
解决办法
5002
查看次数

更改 petite-vue 中的分隔符

我想要这样的东西:

Vue.config.delimiters = ['${', '}']; 
Run Code Online (Sandbox Code Playgroud)

但在娇小的vue中。

PetiteVue 对象没有配置。我希望这个设置是全局的。

如果可能的话这也可以在

v-scope="{{here}}".
Run Code Online (Sandbox Code Playgroud)

vue.js petite-vue

0
推荐指数
1
解决办法
448
查看次数