FIx minor bugs from impress
This commit is contained in:
@@ -267,19 +267,17 @@ def check_left_panel(accessibility_tree):
|
|||||||
root = ET.fromstring(accessibility_tree)
|
root = ET.fromstring(accessibility_tree)
|
||||||
|
|
||||||
for root_pane in root.iter('root-pane'):
|
for root_pane in root.iter('root-pane'):
|
||||||
for split_pane in root_pane.iter('split-pane'):
|
for panel in root_pane.iter('panel'):
|
||||||
for panel in split_pane.iter('panel'):
|
for split_pane in panel.iter('split-pane'):
|
||||||
for scroll_panel in panel.iter('scroll-pane'):
|
# Get the left panel
|
||||||
for document_frame in scroll_panel.iter('document-frame'):
|
if split_pane.attrib.get("{{{}}}parentcoord".format(namespaces['cp'])) == "(0, 0)":
|
||||||
# Get the left panel
|
# Get the visible attribute
|
||||||
panel_name = document_frame.get("name")
|
visible = split_pane.attrib.get("{{{}}}visible".format(namespaces['st']))
|
||||||
# visible = scroll_bar.attrib.get(f"{{{namespaces['st']}}}visible")
|
if visible:
|
||||||
if panel_name == "Slides View":
|
# decide if it is left panel
|
||||||
# Left panel is open
|
return 1.
|
||||||
return 1.0
|
|
||||||
|
|
||||||
# Left panel is not open
|
return 0.
|
||||||
return 0.0
|
|
||||||
|
|
||||||
|
|
||||||
def check_transition(pptx_file, rules):
|
def check_transition(pptx_file, rules):
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"command": [
|
"command": [
|
||||||
"python",
|
"python",
|
||||||
"-c",
|
"-c",
|
||||||
"import pyautogui; import time; pyautogui.click(960, 540); time.sleep(0.5); pyautogui.press('esc'); time.sleep(0.3); pyautogui.press('f10'); time.sleep(0.3); pyautogui.press('right', presses=2, interval=0.1); time.sleep(0.3); pyautogui.press('down', presses=11, interval=0.1); pyautogui.press('enter')"
|
"import pyautogui; import time; pyautogui.click(960, 540); time.sleep(5); pyautogui.press('esc'); time.sleep(0.3); pyautogui.press('f10'); time.sleep(0.3); pyautogui.press('right', presses=2, interval=0.1); time.sleep(0.3); pyautogui.press('down', presses=11, interval=0.1); pyautogui.press('enter')"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user