C:\Users\18826\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\SeleniumLibrary\keywords
--browsermanagement.py
@keyword
def select_window_by_handle(self, locator=None):
self._window_manager.select_by_handle(self.drivers.current, locator)
@keyword
def get_window_handles(self):
"""Returns and logs handles of all windows known to the browser."""
return self._log_list(self._window_manager.get_window_handles(self.drivers.current)
@keyword
def get_current_window_handle(self):
"""Returns and logs handle of current window known to the browser."""
return self._log_list(self._window_manager.get_current_window_handle(self.drivers.current))
C:\Users\18826\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\SeleniumLibrary\locators
--windowmanager.py
def select_by_handle(self, browser, toHandle):
browser.switch_to_window(toHandle)
def get_window_handles(self, browser):
return [window_info[0] for window_info in self._get_window_infos(browser)]
def get_current_window_handle(self, browser):
return browser.get_current_window_handle()
1、关于文件路径,根据自己的来;
2、修改后,记得重新运行RF;
最后,定位页面的元素是要用 Click Element