HOME/Articles/

selenium Example22AssertInAndNotIn (snippet)

Article Outline

Python web automation, selenium example 'Example22AssertInAndNotIn'

Modules used in program:

  • import unittest

Example22AssertInAndNotIn

Python selenium example: Example22AssertInAndNotIn

import unittest


class Test(unittest.TestCase):
    def testName(self):
        my_list = {"python", "selenium", "java"}
        self.assertIn("python", my_list)
        self.assertNotIn("JavaScript", my_list)


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