Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Equipment-crossing capturing-replaying method of Web application

A web application, cross-device technology, used in the development of web aids and software testing

Active Publication Date: 2015-05-06
PEKING UNIV
View PDF3 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, web applications often have the characteristics of faster content updates. How to capture the motion of web applications across devices and play them back when the content changes is an important problem that needs to be solved urgently

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Equipment-crossing capturing-replaying method of Web application

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027]本节给出了PC和Android平台上一个Web应用动作捕捉和回放的实例。该实例模拟了一位学生在PC上登入北大教学网并查询作业发布情况的动作,由于该教学网站只有PC版,在手机上访问比较麻烦,使用本技术后,可以在手机上方便地重现这一过程。

[0028]为了达成跨平台的目标,需要在PC和Android平台上对客户端进行不同的实现。而服务器端部分可以共用,只需要在服务器上利用PHP和MySQL实现存取XML文件、管理用户等功能即可。

[0029]客户端部分较为复杂,下面进行详细介绍。

[0030]PC上的Chrome浏览器有插件功能,客户端可以实现为一个Chrome插件。Chrome插件自带前台与后台的机制,本发明的前台代码可以写在一个contentscript.js文件中,Chrome会自动将contentscript.js注入到每一个网页里面。在contentscript.js文件中,定义实现了前台监听、回放等相关函数。一些通用的函数,如计算编辑距离的函数、筛选结点并回放事件的函数只需要实现一遍即可;而针对不同的事件,需要实现不同的处理函数,然后在window对象上与相应的事件一一进行绑定。在本实例中,核心的两个事件为点击click和输入keyup,对click事件的监听可以记录用户的点击操作,对keyup事件的监听可以记录用户的输入操作;当对应的事件被触发时,用前文所述的方法记录相关信息,然后通过Chrome插件的API发送给后台。需要注意的是,对这两个事件进行回放时需要区别对待:click事件的话只需要通过DOM派发事件的方式模拟点击操作即可,而keyup事件实际对应的是输入操作,因此回放时真正要做的是更改相应结点的value值,这样就可以模拟输入。而Chrome插件的后台部分,需要利用插件API获取前台的事件信息并通过Ajax技术发送到服务器上;此外,还需要实现用户登录、获取脚本、发送待回放事件到前台、单步回放以及自动回放等功能。

[0031]Android平台上,客户端可以实现为APP的形式。Android的SDK中带有WebView组件,可以方便地实现开发者自己定制的浏览器。WebView中带有loadUrl方法,可以用来执行JavaScript代码。在APP的资源文件中,也存有一份contentscript.js文件,内容与Chrome插件中的基本...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an equipment-crossing capturing-replaying method of a Web application. The capturing-replaying method comprises the following steps: (1) mounting a client side on each of user equipment A and user equipment B respectively; (2) recording a DOM (document object model) node corresponding to each event in the Web application and storing the DOM node to a script through a foreground module of the user equipment A according to a DOM document tree of an existing Web application, and then, sending the script to a server through a background module, wherein recorded information includes DOM node position information, context information and body information; (3) while the Web application on the user equipment B is replayed, obtaining the script from the server through the background module of the user equipment B, performing fuzzy matching on the real-time content, in a webpage, of the Web application and the content recorded by the script according to the recorded information in the script, and replaying the Web application. According to the capturing-replaying method, the event script is stored in an XML document, good in expansibility and convenient to edit, and can be freely shared between users.

Description

Technical field [0001] The invention is a method for cross-device motion capture and playback of Web applications, belongs to the field of software technology, and is suitable for Web auxiliary tool development and software testing. Background technique [0002] In the field of software engineering, motion capture and playback of applications has always been a hot topic. With the rapid development of the Internet, the forms of application programs have become diverse. In recent years, there have been more and more applications based on Web technology that can be used through a browser, which we call Web applications. Web applications have the characteristics of cross-platform, installation-free, and high data synchronization, and are one of the most popular software development directions. Motion capture and playback of Web applications has become a new research focus in the field of software engineering. [0003] Nowadays, some researchers have proposed deterministic motion capt...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 黄罡刘譞哲黄震马郓
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products