【发布时间】:2016-08-13 07:43:45
【问题描述】:
我正在从绝对初学者的角度学习 RobotFramework。 我有使用 ruby-watir 和 gherkin 创建自动化脚本的经验。以及 c# 中的自动化。
但是,我什至对 Pycharm 中的 RobotFramework 设置感到困惑。
我已经安装了所有的包 我认为有必要 -包括 selenium/RobotFramework /RobotFramework-selenium2library。
我的 Python.exe 和脚本以及正在添加的环境变量都在正确的目录中。
但是当我跑步时:
from lettuce import *
from behave import *
from Selenium import webdriver
@step("I am on the web")
def step_impl(context):
context.browser = webdriver.Firefox
pass
我明白了:
Traceback (most recent call last):
File "C:/Users/Jordan/PycharmProjects/RbtFrameWork/features/steps/Test_steps.py", line 3, in <module>
from Selenium import webdriver
ImportError: No module named Selenium
我想这与我的 selenium 的安装位置有关——我是通过 pip 安装的
有什么帮助吗?
【问题讨论】:
标签: python-2.7 selenium selenium-webdriver pycharm robotframework