Closed ghacosta closed 8 years ago
Let me see if I've got this straight. Certain characters in your URL string are not being correctly typed. You try to detect these characters based on ascii ranges and if detected you perform ALT+4,7.
For my clarification, what does ALT+4,7 achieve on your system or is it just a stand-in? What characters are special?
You're right, I called special characters those which are neither numbers nor letters.
For example, '/, :, @' and so on, for those characters I'm not being able to type it, so I tried, just for testing, try to input 'ALT + 47' which should type a '/', if you try,
But I was wrong, In linux-based sistem you have to use Ctrl + Shift + U + unicode_hex_code
So, my solution was:
ch_hex = hex(ord(ch))
k.press_keys([k.control_key, k.shift_key, 'u', str(ch_hex)[2], str(ch_hex)[3]])
Hi there, I need to type an URL but k.type_string(url) doesn't do the trick.
Also I tested to iterate the URL string and invoke alt-codes based on ord() like this: `url = 'http://google.com/'
'if' statement works, but I'm not able to insert any special char. Does any knows a way to input special chars?
Thanks in forward.