Skip to content

Commit 962f3fb

Browse files
committed
Fix escape character issue with \
1 parent 8885acb commit 962f3fb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/finding_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -543,24 +543,24 @@ def test_create_finding_with_unqiue_characters(self):
543543
self.assertNoConsoleErrors()
544544
driver.find_element(By.ID, "id_title").clear()
545545
# Backslash causes error
546-
driver.find_element(By.ID, "id_title").send_keys("App Vulnerable to XSS from \Template") # noqa: W605
546+
driver.find_element(By.ID, "id_title").send_keys("App Vulnerable to XSS from \\Template") # noqa: W605
547547
self.assertNoConsoleErrors()
548548
# Click the 'finished' button to submit
549549
driver.find_element(By.ID, "id_finished").click()
550550
self.assertNoConsoleErrors()
551551
# Query the site to determine if the finding has been added
552552
# Assert to the query to determine status of failure
553553
self.assertTrue(self.is_success_message_present(text="Finding from template added successfully."))
554-
self.assertTrue(self.is_text_present_on_page(text="App Vulnerable to XSS From Template"))
554+
self.assertTrue(self.is_text_present_on_page(text="App Vulnerable to XSS From \\Template")) # noqa: W605
555555

556556
# Navigate back to the finding list
557557
driver.find_element(By.LINK_TEXT, "Findings").click()
558558
self.assertNoConsoleErrors()
559-
driver.find_element(By.LINK_TEXT, "App Vulnerable to XSS from \Template").click() # noqa: W605
559+
driver.find_element(By.LINK_TEXT, "App Vulnerable to XSS from \\Template").click() # noqa: W605
560560
self.assertNoConsoleErrors()
561561

562562
# Assert that the finding is present
563-
self.assertTrue(self.is_text_present_on_page(text="App Vulnerable to XSS from \Template")) # noqa: W605
563+
self.assertTrue(self.is_text_present_on_page(text="App Vulnerable to XSS from \\Template")) # noqa: W605
564564

565565
@on_exception_html_source_logger
566566
def test_delete_finding_template(self):

0 commit comments

Comments
 (0)