Giter VIP home page Giter VIP logo

Comments (15)

adam-wypych avatar adam-wypych commented on August 29, 2024 1

We just think about modify a little bit attrs dictionary send to RED listener to send empty args list inside for start_keyword and end_keyword. As far as I've been tested it works with example provide by You.

The reason is that we do not depends on args when keyword is starting and correction is just one line attrs['args'] = [] before self._send_socket("start_keyword", name, attrs) and self._send_socket("end_keyword", name, attrs)

The correction will be available in new upcome release.

Information about listener API: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#id760

from red.

alexandrul avatar alexandrul commented on August 29, 2024 1

Thank you for the pointers, it works just fine on my pc.

from red.

alexandrul avatar alexandrul commented on August 29, 2024

Of course, monkey-patching can be used to avoid this, but the issue may occur in the future for other corner cases.

from red.

adam-wypych avatar adam-wypych commented on August 29, 2024

Few questions about software version, which You are using :)

  1. RED version?
  2. Robot Framework?
  3. Interpreter is python, jython or ironpython and in which version?
  4. selenium library?

from red.

alexandrul avatar alexandrul commented on August 29, 2024

RED - Robot Editor version 0.6.5 0.6.5.201607071059
Eclipse Platform 4.6.0.I20160606-1100
robotframework 3.0.1.dev20151231
Python 2.7.12
selenium 2.53.6

from red.

alexandrul avatar alexandrul commented on August 29, 2024

However, the issue is in TestRunnerAgent.py, that's why I have skipped the environment details.

My workaround was to use http://stackoverflow.com/questions/18478287/making-object-json-serializable-with-regular-encoder to make selenium.webdriver.chrome.webdriver.WebDriver JSON serializable.

from red.

adam-wypych avatar adam-wypych commented on August 29, 2024

Just for update, I checked it deeply and this issue is mainly connected to wrapping a call

BuiltIn().run_keyword(self, name, args*)

inside keyword call by user, where args contains complex object as one of parameter. I. e. I made library (KeywordLibrary.py) like this:

class User(object):
    def __init__(self, name, password):
        self.name = name
        self.password = password

kepler = User('A. Kepler', 'secret')

from robot.libraries.BuiltIn import BuiltIn

class KeywordLibrary:
    def keyword(self, name):
        pass

    def call_keyword(self):
        return BuiltIn().run_keyword("keyword", {"name": kepler})

the corresponding test case is very simple:

*** Settings ***
Library    KeywordLibrary.py

*** Test Cases ***
T1
    Call Keyword

The issue is also reproduce even Selenium is not used.

from red.

kootstra avatar kootstra commented on August 29, 2024

I have encountered the same issue, and the suggested C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py alteration has the desired effect for RIDE, but sadly doesn't work with RED.

It seems to me that RED actually creates the TestRunnerAgent.py file from a different source as it refers to a temp file: C:\Users[user]\AppData\Local\Temp\RobotTempDir2655008392341869025\TestRunnerAgent.py. Does anyone know where to locate the original file?

When altering this temporary version, the errors do disappear, so when I have access to the original file it could be permanent. Otherwise after every RED application restart I have to do this again.

from red.

alexandrul avatar alexandrul commented on August 29, 2024

from red.

kootstra avatar kootstra commented on August 29, 2024

Thanks. That should help. Will let you know tomorrow if that works for me.

from red.

michalanglart avatar michalanglart commented on August 29, 2024

@kootstra RED does not use the agent provided with RIDE. We provide our own version of it (modified version of what RIDE uses) which is located in the jar mentioned by @alexandrul. Upcoming RED release will of course provide the fix in agent code (we expect to release new version within 1-2 weeks).

from red.

kootstra avatar kootstra commented on August 29, 2024

@michalanglart from the logs I already understood that the file is generated from one of the classes and does not use the one in Python directory.

After updating the TestRunnerAgent.py file in the org.robotframework.ide.core-functions-0.0.1-SNAPSHOT.jar class the errors dissapear. However, the debug functionality also no longer works. So, I guess that is one step forward, and two steps back.

from red.

adam-wypych avatar adam-wypych commented on August 29, 2024

@kootstra Please download updated version, which will be included in new release: https://gist.githubusercontent.com/adam-wypych/4e23e33f051f7bd0713fcdbe8e17c733/raw/e7367b57254d94d22d01be46e72aad377b4c29b0/TestRunnerAgent.py .

from red.

kootstra avatar kootstra commented on August 29, 2024

@adam-wypych Thanks. That indeed works. Looking forward to the new release.

from red.

KrzysztofJozefowicz avatar KrzysztofJozefowicz commented on August 29, 2024

released in 0.7.0

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.