lte2000 / intellibot

IntelliJ/PyCharm plugin for Robot Automation Framework
https://github.com/lte2000/intellibot
MIT License
91 stars 26 forks source link

Having problems with Resource and Variables imports #39

Open packlikez opened 2 years ago

packlikez commented 2 years ago

I'm using Pycharm 2021.2.3 and Plugin 0.10.143.398

My code is like

Resource    ${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot
Variables   ${CURDIR}/../../resources/testdata/landing/get_merchant_landing.yaml
Variables   ${CURDIR}/../../resources/testdata/landing/datatest_get_merchant.yaml
Variables   ${CURDIR}/../../resources/testdata/elastic/merchant_data.yaml

My plugin debug...



12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] path::CURDIR/../../keywords/api/landing/

12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] file::get_guest_merchant_landing.robot

12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] can't found

12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] Attempting global robot search

12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] path::CURDIR/../../keywords/api/landing/

12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] file::get_guest_merchant_landing.robot

12:02   Debug: [RobotFileManager][${CURDIR}/../../keywords/api/landing/get_guest_merchant_landing.robot] can't found
lte2000 commented 2 years ago

why not use Resource ../../keywords/api/landing/get_guest_merchant_landing.robot directly?

Anyway, you can try in Setting -> Robot Options -> Variables, provide ${CURDIR}=.

packlikez commented 2 years ago

I'd tried to set Variables and the path is changed to the correct path and it didn't work

I can use this cat /Users/knrm/PycharmProjects/landing_robot/resources/imports.robot to print its content

12:28   Debug: [RobotFileManager][${CURDIR}/../../resources/imports.robot] trying: /Users/knrm/PycharmProjects/landing_robot/resources/imports.robot

12:28   Debug: [RobotFileManager][${CURDIR}/../../resources/imports.robot] no acceptable matches

12:28   Debug: [RobotFileManager][${CURDIR}/../../resources/imports.robot] can't found
packlikez commented 2 years ago

By the way, I'm running on Macbook Pro M1 is that gonna be an issue?

lte2000 commented 2 years ago

Do you set In option, ${CURDIR}=. exactly one dot.

packlikez commented 2 years ago

Do you set In option, ${CURDIR}=. exactly one dot.

It works only for .robot files but not for .yaml files

and it didn't work for Keyword navigation

lte2000 commented 2 years ago

Resolving yaml variable file is not supported by this plugin.

packlikez commented 2 years ago

How about navigation for custom keywords?

lte2000 commented 2 years ago

Do you mean ctrl+click a keyword in testcase then jump to the definition? It works fine.

packlikez commented 2 years ago

Yes, that is what I meant. In my case, it didn't work. it kept popup resolving definition loading... and when the popup was down then nothing happens.

Those keywords are in Resource that didn't work but the keywords are in Library are fine