ver Mar20th
fixed a bug in _create_pywinauto_node
This commit is contained in:
@@ -545,12 +545,14 @@ def _create_pywinauto_node(node: BaseWrapper, depth: int = 0, flag: Optional[str
|
|||||||
node_role_name = "".join( map( lambda ch: ch if ch.isidentifier()\
|
node_role_name = "".join( map( lambda ch: ch if ch.isidentifier()\
|
||||||
or ch in {"-"}\
|
or ch in {"-"}\
|
||||||
or ch.isalnum()
|
or ch.isalnum()
|
||||||
else "-"
|
else "-"
|
||||||
, node_role_name
|
, node_role_name
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if node_role_name.strip() == "":
|
if node_role_name.strip() == "":
|
||||||
node_role_name = "unknown"
|
node_role_name = "unknown"
|
||||||
|
if not node_role_name[0].isalpha():
|
||||||
|
node_role_name = "tag" + node_role_name
|
||||||
|
|
||||||
xml_node = lxml.etree.Element(
|
xml_node = lxml.etree.Element(
|
||||||
node_role_name,
|
node_role_name,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"type": "launch",
|
"type": "launch",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"command": [
|
"command": [
|
||||||
"google-chrome",
|
"C:\Program Files\Google\Chrome\Application\chrome.exe",
|
||||||
"--remote-debugging-port=1337"
|
"--remote-debugging-port=1337"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user