Listener to perform spell check in navigated web page using TextBlob, Robotframework (selenium)
-
Robotframework (selenium) will fetch current page content (in listener)
seleniumlib = BuiltIn().get_library_instance('SeleniumLibrary') text = seleniumlib.get_text("//body") -
Fetched page text is passed to TextBlob
blob = TextBlob("Page Content here") -
Split text into words and perform spell check for each word
for word in blob.words: spell = word.spellcheck()
-
TextBlob
pip install -U textblob python -m textblob.download_corpora -
Robotframework
pip install robotframework -
Robotframework-selenium
pip install robotframework-seleniumlibrary
-
Step 1: Download or clone this repo
https://github.com/adiralashiva8/robotframework-spellchecker.git -
Step 2: Copy
SpellCheckListener.pyto your project -
Step 3: Execute test case/suites using SpellCheckListener
robot --listener SpellCheckListener.py -V data.py test.robotNote: Here data.py is variable file which contains words (list type), which need to be ignored while performing spell check
-
Step 4:
SpellCheckResult.htmlwill be generated after completion of suite
- Check for grammar
- Provide better report
-
Plural words
errorsis considered as spelling mistake -
Case sensitive
Pageis considered as spelling mistake -
Word endings with extra content not considered as error
keyboarddis not an error -
Special chars in words
don'tis considered as spelling mistake
Special Thanks To:
Idea by:
⭐ repo if you like it
