1

I have a Python/Selenium project where I need to run code from a different file than the main one with from ABC import XYZ, but in the same driver (without opening a new window). From what I found, it seems that the idea is to make a singleton file, which I've done using the code from their website.

Initially, I've been getting "lib not found", which was fixed with pip install robot, but now I'm running into "No module named 'robot.api'" and I can't seem to find the issue. Tried pip install robotframework-databaselibrary but that wasn't it.

What am I missing here? FYI, my singleton.py is in the same folder as the other two .py files and my first line "from robot.api import logger" is greyed out in PyCharm.

1 Answer 1

5

You have installed the wrong package - robot looks like a Django library, while you need robotframework:

pip install robotframework

But before installing the correct one, remove the robot package - you'll have two with the same name, and the "wrong" probably resolves first.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.