Collecting accuracy and availability attributes
Collect the error details related to the accuracy and availability of your application by defining the accuracy errors and availability errors criteria in a script.
Accuracy errors are determined based on content validation, title validation, and response data verification.
Availability errors occur when the application does not respond or when the application responds with an error indicating it is unavailable.
Use the following functions in the script to get the accuracy errors based on the title and data verification.
- For the title verification:
driver.verify_title("<title to verify>")
- For the data verification:
driver.verify_data("<content to verify>")
Call the driver.verify_data() method multiple times to verify multiple data strings.
In the following script example, we verify the title and data on a webpage.
from selenium import webdriver
from STMWebDriver import STMWebDriver
options = webdriver.ChromeOptions()
options.add_argument("--disable-gpu")
options.add_argument("--headless")
driver = STMWebDriver.Chrome(options=options)
try:
driver.verify_title('Documentation')
driver.verify_data('BMC Product Documentation')
driver.get('https://docs.bmc.com/docs/')
finally:
driver.close()
driver.quit()