Selenium supports Python and thus can be utilized with Selenium for testing.
You can run Python scripts for Firefox, Chrome, IE, etc.ondifferent Operating Systems.
Python is a high-level object-oriented scripting language. It is designed in a user-friendly manner. Python uses simple English keywords, which is easy to interpret. It has less syntax complications than any other programming languages.
See some of the examples in the table below.
| Keyword | Meaning | Usage |
| elif | Else if | Else if |
| else | Else | if: X; elif: Y; else: J |
| except | do this ,If an exception happens, | except ValueError, a: print a |
| exec | Run string as Python | exec 'print "hello world !"' |
Selenium is a tool to test your web application. You can do this in various ways, for instance
Few points that favor Python over Java to use with Selenium is,
1. Java programs tend to run slower compared to Python programs.
2. Java uses traditional braces to start and ends blocks, while Python uses indentation.
3. Java employs static typing, while Python is dynamically typed.
4. Python is simpler and more compact compared to Java.
Comments
Show all comments