python - 最大化浏览器窗口,RobotFramework
问题描述
我正在学习 RobotFramework,我有一个简单的脚本:
*** Settings ***
Documentation Simple Amazon.in demo
Library SeleniumLibrary
*** Variables ***
${MESSAGE} Hello, World
*** Test Cases ***
User must sign in to check out
[Documentation] This is some basic info about the test
[Tags] Smoke
Open Browser http://www.amazon.in firefox
Input text id=twotabsearchtextbox Ferrari 458
Click Button xpath=//div[@class='nav-search-submit nav-sprite']/input[@class='nav-input' and 1]
Wait until page Contains results for "Ferrari 458"
Click Link css=#result_0 a.s-access-detail-page
Wait until Page Contains Back to search results for "Ferrari 458"
Click Button id=add-to-cart-button
Wait Until Page Contains 1 item added to Cart
一切正常,但浏览器窗口没有最大化,请帮助我,我该怎么做。
这是我的点子配置
robotframework 3.1
robotframework-requests 0.5.0
robotframework-seleniumlibrary 3.2.0
selenium 3.141.0
解决方案
首先,您可以Maximize Browser Window
在打开浏览器后使用关键字。
如果这不起作用;这里建议有可能的修复: https ://github.com/robotframework/SeleniumLibrary/issues/123
看看能不能解决你的问题。让我知道是否有。
推荐阅读
- laravel - 搜索查询只返回一个用户
- python - 我在 pycharm 中导入 nmap 时遇到问题
- c# - 在 Windows 应用程序中导出数据时向 Excel 文件添加多个标题文本
- python - 如何在 SQL Server 管理工作室中运行 exe 文件
- python - 如何从 IMDB 网站上抓取电影信息?
- java - 如何解决“原因:类型代码无效:8F”
- ios - 是否可以在 iOS UI 测试中模拟两指滑动?
- dart - 如何在 Flutter 中管理对象列表流?
- ios - 错误:沙箱与 Podfile.lock 不同步。运行“pod install”或更新您的 CocoaPods 安装
- xamarin.android - 如何在 Xamarin 中序列化对 Android 可调用包装器的托管对等方的引用