Concept of creating the Self Healing Model - ( InProgress )

Hey folks, I'm currently working on implementing the concept of self-healing. Below is the initial draft of my script. I'll keep you posted on my progress and provide updates once I complete this task :


Step 1: Utilize Selenium to scrape the current page and save the elements in a CSV file as outlined below.


Step 2: Capture the attributes of each element and store them in a database. This can be done either manually or by implementing a script to update the scraped elements into the database.


Step 3: Implement Self-Healing mechanisms for situations where the attribute of an element undergoes changes. Tests should be capable of identifying the correct element based on its alternative attributes, employing Machine Learning (ML) techniques.


a. Train the ML model to determine the probability of each element.

b. Training requires two datasets in CSV format.


Step 4: Initiate model training exclusively when element-not-found exceptions (NoSuchElementException) occur. This ensures that training is invoked only when necessary.


Step 5: The Predict_elements method should return the element alongside a data frame (test) containing all its attributes (tag, id, type, class, name, aria-autocomplete, title, href, text, value, aria-label). Create a dictionary for each attribute of that element:

{‘tag’: ’input’, ‘id’: ’userpassword, ‘type’: ‘password’}


Step 6: Once the correct element is identified along with its attributes, establish a priority order for these attributes. Utilize the Selenium method to locate the element based on the attribute and return it to the initial method where the NoSuchElementException occurred.

Draft Architecture



Comments

Popular posts from this blog

The self healing automation framework - Healenium Updated Dec2023

Heleanium - Web without using Docker