- Selenium WebDriver 3 Practical Guide
- Unmesh Gundecha Satya Avasarala
- 196字
- 2021-08-13 16:08:06
Inspecting pages and elements with Mozilla Firefox
The newer versions of Mozilla Firefox provide built-in ways to inspect the page and elements. To inspect an element from the page, move the mouse over the desired element and right-click to open the pop-up menu. Select the Inspect Element option, as shown in the following screenshot:

This will display the Inspector tab with the HTML code in a tree format with the selected element highlighted, as shown in the following screenshot:

Using Inspector, we can also validate the XPath or CSS Selectors using the search box shown in the Inspector section. Just enter the XPath or CSS Selector and Inspector will highlight the elements that match the expression, as shown in the following screenshot:

The Developer tools provide various other debugging features. It also generates XPath and CSS selectors for elements. For this, select the desired element in the tree, right-click, and select the Copy > XPath or Copy > CSS Path option from the pop-up menu, as shown in the following screenshot:

This will paste the suggested XPath or CSS selector value to the clipboard to be used later with the findElement() method.
- Cisco OSPF命令與配置手冊
- 物聯(lián)網智慧安監(jiān)技術
- 物聯(lián)網識別技術
- TCP/IP入門經典(第5版)
- 計算機網絡安全實訓教程(第二版)
- 農產品物聯(lián)網研究與應用
- Practical Web Design
- Yii Application Development Cookbook(Second Edition)
- 中國互聯(lián)網發(fā)展報告2018
- 設備監(jiān)控技術詳解
- 深入理解Nginx:模塊開發(fā)與架構解析
- 沖擊:5G如何改變世界
- 物聯(lián)網的機遇與利用
- Hands-On Docker for Microservices with Python
- 商業(yè)的本質和互聯(lián)網