print "&lang=" does not print the expected string --- workaround
*** workaround ***
see comment #2
use instead:
x = "a string that contains &xxxx; elments (e.g. &lang=)"
print x.replace('&', '&') # & is unicode repr. of & (chr(38))
-------
I am setting a text constant to langtype = "&lang=". This and other text constants are being concatenated to form an html address that I paste into a Chrome address bar. It wasn't working, so I added a print command to see what Sikuli was doing. It is changing this constant to a box character, as if it doesn't understand the constant. I've tried moving the constant to the beginning and end of the text; it doesn't seem to matter.
What's really odd is that I am concatenating a language string so my page loads in a different language each time. I have these languages stored in an array. The first language loads ok, but the second loads the previous language. The print shows me each time that Sikuli is using a box instead of the text.
I'm on Sikuli X-1.0rc2, on a 32bit Windows XP system.
I don't get any errors. The script loads the correct language in the address the first time, but the second time through the loop, I get the first language again.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was originally filed as bug #799929.
Can you help with this problem?
Provide an answer of your own, or ask MJ Skeet for more information if necessary.