I am using python 2.5.
Code: Select all
import RanorexPython as Ranorex
Ranorex.ControlGetText(combobox)
Code: Select all
import RanorexPython as Ranorex
Ranorex.ControlGetText(combobox)
Which Ranorex version do you use?gurpreet singh wrote:I'm am not able to get japanese or chinese character properly.
I am using python 2.5.
Code: Select all
import os, sys, optparse, imp
import RanorexPython as Ranorex
import os.path
import win32api
import time
def main():
timeScale = 1.0
Ranorex.ElementIgnoreInvisible(1)
form = Ranorex.FormFindTitle("Properties", Ranorex.MATCH_SUBSTRING)
if form == 0:
return 1
Ranorex.FormActivate(form)
editPath = Ranorex.FormFindChildControlId(form, 6745)
if editPath == 0:
return 1
Ranorex.ControlSetFocus(editPath)
Ranorex.ControlSendKeys(0, "", 500)
dPath = Ranorex.ControlGetText(editPath)
editControl = Ranorex.FormFindChildControlId(form, 6746)
if editControl == 0:
return 1
Ranorex.ControlSetFocus(editControl);
controlElement = Ranorex.ControlGetElement(editControl)
if controlElement == None:
return 1
time.sleep(2)
Ranorex.ControlSendKeys(0, "", 500)
Path = Ranorex.ControlGetText(editControl)
writePath = dPath + "\n" + cPath
tempfile = open("C:\\Temp\\pathfile.txt", "w")
tempfile.writelines(writePath)
tempfile.close()
As stated before, Ranorex 1.X does not support Unicode characters, sorry!gurpreet singh wrote:Ranorex version is "Ranorex-1.5.3.6580".