Selenium Webdriver Object Repository(2)

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.
Page Tree

Object Repository

We deposit all object information with csv file.
Object Repository

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.
Add Object

Generate Code

We can generate java selenium webdriver automatically, can save much time to design script.
Generate Code

Object Highlight

We also can highlight one object, or check all objects in this page that we added in the repository.
Hight
Note:

  1. Need to ‘Start’ service before do highlight and check function.
  2. Will set background to red if not find the element.
  3. 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.

唐胡璐 wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
分享创造价值,您的支持将鼓励我继续前行!