import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys


class PythonOrgSearch(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Firefox()
        self.driver.get("localhost:8080")

    def test_graph_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnGraph').click()
        self.assertEqual("```graph\n\n```", driver.find_element_by_id("editor").get_attribute('value'))

    def test_table_btn(self):
        driver = self.driver
        driver.find_element_by_id('tableButton').click()
        self.assertTrue(driver.find_element_by_id('dialog').is_displayed())

    def test_H1_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnH1').click()
        self.assertTrue("# ", driver.find_element_by_id("editor").get_attribute('value'))

    def test_H2_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnH2').click()
        self.assertTrue("## ", driver.find_element_by_id("editor").get_attribute('value'))

    def test_H3_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnH3').click()
        self.assertTrue("### ", driver.find_element_by_id("editor").get_attribute('value'))

    def test_H4_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnH4').click()
        self.assertTrue("#### ", driver.find_element_by_id("editor").get_attribute('value'))

    def test_H5_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnH5').click()
        self.assertTrue("##### ", driver.find_element_by_id("editor").get_attribute('value'))

    def test_H6_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnH6').click()
        self.assertTrue("###### ", driver.find_element_by_id("editor").get_attribute('value'))

    def test_bold_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnBold').click()
        self.assertTrue("++   ++", driver.find_element_by_id("editor").get_attribute('value'))

    def test_italic_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnItalic').click()
        self.assertTrue("~~  ~~", driver.find_element_by_id("editor").get_attribute('value'))

    def test_underline_btn(self):
        driver = self.driver
        driver.find_element_by_id('btnUnderline').click()
        self.assertTrue("__  __", driver.find_element_by_id("editor").get_attribute('value'))

    def tearDown(self):
        self.driver.close()


if __name__ == "__main__":
    unittest.main()

@@ -2477,32 +2477,256 @@
 bute('value'))%0A%0A
+    def test_strikeThrough_btn(self):%0A        driver = self.driver%0A        driver.find_element_by_id('btnStrikeThrough').click()%0A        self.assertTrue(%22--  --%22, driver.find_element_by_id(%22editor%22).get_attribute('value'))%0A%0A
     def tearDown

test btnStrikeThrough