Implementation method of Java selenium using browser debugging tool

In UI element - based automated testing, both desktop UI automated testing and Web UI automated testing First, we need to find and identify UI elements

In Web-based UI automation testing, testers need to understand some knowledge of HTML, CSS and JavaScript, and learn to use the debugging functions of various browsers

To find elements on a Web UI page, you must first understand the DOM structure of the page, the attributes of the elements, and even some JavaScript call information Now mainstream browsers come with many powerful tools

Reading catalog

Google Chrome

Google Chrome comes with its own web development debugging tool, which can be started in three ways

Method 1: press F12 shortcut key

Method 2: click the icon - > more tools - > Developer Tools menu command in the upper right corner, open developer tools, click the "arrow" icon, and then select the element you want to find Please see the animation below

Method 3: place the mouse over the UI element you want, right-click, and select the inspect element menu command

We can also use chrome to get the XPath of the element directly

Internet Explorer or edge

Microsoft's own browser also has "developer tools", which can be started through the tool menu or F12

Firebug plugin for Firefox

Firefox is the best browser supported by selenium. It is recommended to install firebug plug-in in Firefox Using firebug is also very convenient to find page elements

Firebug as like as two peas Chrome debugging tools. I won't explain it in detail here

Use the firefinder plug-in to test XPath statements

In automated testing, we often need to write XPath. We can verify whether the XPath statements we write are correct through the firefinder plug-in

The above is the data sorting of Java selenium using browser debugging tools. We will continue to supplement relevant data in the future. Thank you for your support for this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>