Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1490 by [email protected]: wrong instance return when Wait For Process of new Process library with Remote Library
http://code.google.com/p/robotframework/issues/detail?id=1490

Please explain the bug you have encountered, including how to reproduce it.
Always mention Robot Framework version, used interpreter
(Python/Jython/IronPython) and its version, as well as the operating
system. You can, for example, copy the output of `pybot/jybot/ipybot
--version` command.

For new features and other enhancements, please use the `Enhancement
request` template. Notice that this is a public *issue tracker* for *Robot
Framework itself*. Related projects such as RIDE and SeleniumLibrary have
their own issue trackers. Questions should be sent to robotframework-users
mailing list.

All this text can be deleted.

Version:
Windows7 x86
Python 2.7.3
RF 2.8.1
Ride 1.1

Repro:
1. Remote server import this and run remote server

#!/usr/bin/env python

import os
import sys

from robot.libraries.Process import Process


class ExampleRemoteLibrary(Process):

    def __init__(self):
        Process.__init__(self)

if __name__ == '__main__':
    from robotremoteserver import RobotRemoteServer
    RobotRemoteServer(ExampleRemoteLibrary(), *sys.argv[1:])

2. Run Test Data
*** Settings ***
Library           Remote    http://192.168.10.10:8270    WITH NAME    Remote
Library           Process    WITH NAME    local

*** Test Cases ***
${result}= local.Start Process notepad.exe -> and then close notepad
    ${result}    local.Wait For Process    ${result}   -> pass
    log    ${result.rc}      ->  Pass
${result}= Remote.Start Process notepad.exe -> and then close notepad
    ${result}    Remote.Wait For Process    ${result}    -> pass
    log    ${result.rc}     -> fail

error message ->
+---- START KW: BuiltIn.Log [ ${result.rc} ]
Resolving variable '${result.rc}' failed: AttributeError: 'str' object has no attribute 'rc'

I don't know why the object is 'str'. I wrote same code in local and remote test data, but result is different. Is it a bug or my mistake?

Thank You.

-----------------
Detail Debug

+---- START KW: ${result} = local.Start Process [ notepad.exe ]
Starting process:
['notepad.exe']
Process configuration:
cwd = C:\BuFF\MyTestData
stdout_stream = -1
stderr_stream = -1
shell = False
alias = None
env = None
${result} = 1
+---- END KW: ${result} = local.Start Process (15)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---- START KW: ${result} = local.Wait For Process [ ${result} ]
Waiting for process to complete.
Process completed.
${result} = <result object with rc 0>
+---- END KW: ${result} = local.Wait For Process (2059)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---- START KW: BuiltIn.Log [ ${result.rc} ]
0
+---- END KW: BuiltIn.Log (0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---- START KW: ${result} = Remote.Start Process [ notepad.exe ]
${result} = 2
+---- END KW: ${result} = Remote.Start Process (16)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---- START KW: ${result} = Remote.Wait For Process [ ${result} ]
${result} = <result object with rc 0>
+---- END KW: ${result} = Remote.Wait For Process (2901)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---- START KW: BuiltIn.Log [ ${result.rc} ]
Resolving variable '${result.rc}' failed: AttributeError: 'str' object has no attribute 'rc'
+---- END KW: BuiltIn.Log (0)


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to