机械手框架-Selenium库导入问题(Python 3.7) [英] Robot Framework - Selenium Library Import Issue on Ride (Python 3.7)

查看:138
本文介绍了机械手框架-Selenium库导入问题(Python 3.7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

起初我在安装硒库时遇到了一些麻烦,进入一些网站后,我在提示命令上使用命令 pip install -U selenium 安装了该库,但是在导入该库后转到"Ride",该名称显示为红色,如下图所示

I had some troubles to install selenium library at first, after I went trough some websites, I installed the library using the command pip install -U selenium on prompt command, however, after importing the library to Ride, the name appears in red as photos below shows

我查看了Lib(Ananconda3)文件夹以检查是否存在与Selenium相关的文件夹,然后在其中找到了它,因此,我不明白为什么Ride无法正确导入它

I looked into Lib (Ananconda3) folder to check if there was any folder related to Selenium and I found it out there, therefore, I dont understand why Ride is not importing it properly

任何帮助将不胜感激(ps.我不知道它是否相关,但是我使用的是Windows 10)

Any help will be highly appreciate (ps. I dont know if it is relevant, but I'm using Windows 10)

推荐答案

硒不等于SeleniumLibrary.

Selenium doesn't equal SeleniumLibrary.

您需要遵循安装说明.

如果要在射频中使用硒,则需要安装:

If you want to use selenium in RF, you need to install:

  • 硒=>你已经做到了
  • SeleniumLibrary =>您尚未完成操作,请按照我链接的说明进行操作, $ pip install -U robotframework-seleniumlibrary
  • RF =>从屏幕上看来,您已经完成了, $ pip install -U robotframework

完成这些步骤后,您可以在RF中导入SeleniumLibrary:

After these steps, you can import SeleniumLibrary in RF:

*** Settings ***
Library    SeleniumLibrary

您应该不会看到任何错误.

and you should see no errors.

这篇关于机械手框架-Selenium库导入问题(Python 3.7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆