In the previous blog, we introduced this article [Selenium Object Repository], or the detail info, please see Selenium Webdriver Object Repository and Object Recognition
We implement this tool with winform + c#, the below information just fyi, maybe not detail enough, include:
Page Management
We use a tree to manage the page, one page = one node, can also separate pages into test suite.
Object Repository
We deposit all object information with csv file.
Now, we have many locators, in the following time, we will change it, only have id, xpath, maybe linkText, discard the other locators.
Add Object
Click the page node, we can add object in this page, click ‘Add Object’ button, spy webelement, select its loctor, save with a certain name.
Generate Code
We can generate java selenium webdriver automatically, can save much time to design script.
Object Highlight
We also can highlight one object, or check all objects in this page that we added in the repository.
Note:
- Need to ‘Start’ service before do highlight and check function.
- Will set background to red if not find the element.
- Now we need to do this job(Check All) manually, should be implement this automatically.
This is our POC, our final thinking is that, for UI automation, we can separate UI and business function, for UI level, we can check page element and page navigation based on the object repository, only focus on UI.