┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/appiumtests/dolphintest.py
diff options
context:
space:
mode:
authorFlorian RICHER <[email protected]>2026-05-15 17:29:46 +0200
committerFlorian RICHER <[email protected]>2026-05-31 10:57:56 +0200
commit2a72145eb09276a4576762b74cb976fcd4550e87 (patch)
treec7be1a38ab004c12162edff698fceafe3d8e6488 /appiumtests/dolphintest.py
parentf622de7f00b6585c9a17e3ed208921582babf77e (diff)
dolphinview: Unselect navigator when click on background
Diffstat (limited to 'appiumtests/dolphintest.py')
-rwxr-xr-xappiumtests/dolphintest.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/appiumtests/dolphintest.py b/appiumtests/dolphintest.py
index f0df3941e..2f1d3c6bf 100755
--- a/appiumtests/dolphintest.py
+++ b/appiumtests/dolphintest.py
@@ -95,6 +95,38 @@ class DolphinTests(unittest.TestCase):
self.assertEqual(len(elements), 2)
self.assertEqual(elements[0].text, "test1.txt")
self.assertEqual(elements[1].text, "test2.txt")
+
+ def test_3_autovalidate_url(self):
+ dolphinBackground = self.driver.find_element(
+ by=AppiumBy.ACCESSIBILITY_ID,
+ value="DolphinViewContainer.DolphinView.KItemListContainer"
+ )
+
+ editButton = self.driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value="KUrlNavigatorToggleButton")
+ editButton.click()
+
+ # clear contents
+ clearButton = self.driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value="DolphinUrlNavigator.KUrlComboBox.KLineEdit.QLineEditIconButton")
+ clearButton.click()
+
+ locationBar = self.driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value="DolphinUrlNavigator.KUrlComboBox.KLineEdit")
+ locationBar.send_keys("{}/testDir".format(os.environ["HOME"]))
+
+ # Move to the bottom right at 50px of the border to ensure not clicking on items
+ rect = dolphinBackground.rect
+ x = rect['width'] - 50
+ y = rect['height'] - 50
+
+ actions = ActionChains(self.driver)
+ actions.move_to_element_with_offset(dolphinBackground, x, y).click().perform()
+
+ # Check if the button visible on edit mode has been hidden
+ self.assertFalse(clearButton.is_displayed())
+
+ elements = self.driver.find_elements(by=AppiumBy.XPATH, value="//table_cell")
+ self.assertEqual(len(elements), 2)
+ self.assertEqual(elements[0].text, "test1.txt")
+ self.assertEqual(elements[1].text, "test2.txt")
"""