Coder Social home page Coder Social logo

Resources importing about red HOT 5 CLOSED

nokia avatar nokia commented on August 27, 2024
Resources importing

from red.

Comments (5)

Mario-P avatar Mario-P commented on August 27, 2024

Update.
I see that proper settings of Referenced libraries -> Paths is Common and Site with path relativeness set to PROJECT. Then when I hover mouse over one of the entries in Path section I can see proper path.

Now I created new directory inside Sites and suite inside this new directory and tried to import resource sire_resource.robot and it is also not possible. I'm guessing something is not ok with importing.

from red.

KrzysztofJozefowicz avatar KrzysztofJozefowicz commented on August 27, 2024

Hi
Indeed RED does not fully support importing resources and var files when those files are imported using parameter in path either declared in the same file or in python file (loclal or global).
It only works using VariableMappings from red.xml in General Tab.
Following suite with res.robot and vars in "folder" subdirectory will PASS but RED shows errors for not known res_kw and ${var_1}.

*** Settings ***
Resource     ${resource}/res.robot
Variables    ${resource}/vars.py
*** Variables ***
${resource}  folder

*** Test Cases ***
t1
   log  ${var_1}
   res_kw
*** Keywords ***

I have created internal Jira as this is an enhancement to work the same as with parametrized path to libs

from red.

Mario-P avatar Mario-P commented on August 27, 2024

I'm not sure if we are talking about the same things, so once again with pictures :).

  1. I'm creating a RED project (location d:\red_tests). project_structure
  2. I'm creating common_resource.robot inside with some keywords.
  3. I'm putting "./" to pythonpath with relativeness to project in red.xml. red_xml
  4. I'm creating folder Tests and inside a suite - RED_test_suite.test_suite

suite code:

*** Settings ***
Resource          common_resource.robot

*** Test Cases ***
TestCase
    RED test keyword

As you see I have not used any parameters while importing resource and still that resource is not recognized.

So I'm referring to the fact that RED is not recognizing resource files that are already in pythonpath (RIDE deals with that kind of importing).

from red.

KrzysztofJozefowicz avatar KrzysztofJozefowicz commented on August 27, 2024

ok, we talked about different thing, resource resolving from PythonPath should also be added although usage for us is controversial ;) .
I have created another issue in Jira for that.

from red.

sumnanda avatar sumnanda commented on August 27, 2024

Hello,
I am having similar issue as stated above. Can you please tell me how can this be resolved?

Thanks,
Sanam

from red.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.