InnerText, InnerHTML

Source: Internet
Author: User
Tags xpath

Modify the text content of the label, if the modified string has a label format, will not show the label to the page

Prints all the child tags in a label as a string, and if the modified string is formatted as a label, it is displayed directly on the page

Select operation
By value
Must be the value in option

SelectedIndex modified by the angle mark
Expand the Select tab and position 0-n from top to bottom

1, the label
2, the head tag link
3. Style in head
. c1{
WID;; Xxxx
. c2{}

Common class
<div class= ' C1 C2 ' ></div>
<div id= ' I1 ' ></div>

Get Label class Property string type modified by space interval CSS Selector

Create a label
After child tags
div.insertadjacenthtml (' BeforeEnd ', str)
Child label Front
div.insertadjacenthtml (' Afterbegin ', str)
Get label Front
div.insertadjacenthtml (' Beforebegin ', str)
Get tag behind
div.insertadjacenthtml (' afterend ', str)

1, InnerHTML
2. Eleobj.removechild (Child) parameter accepts sub-label object

Location.href = Location.href
Location.reload ()

= = and = = = Difference
= = Checks only if the value is the same and does not verify the data type

= = = Verify both data type and checksum value

This loop supports arrays and dictionaries
var list = [' Dsx ', ' nn '];
var dict = {"Name": "Dsx", "Age": "18"};
for (var i in dict) {
Console.log (i)

This is a loop that does not support dictionaries
for (Var i=0;i<3;i++) {
Console.log (List[i])

Improve the JS of the lottery page
View the winning record
View All prize information

* Represents get all elements
@ followed by property name
*[@id = ' i1 ')
Attribute positioning
As long as the attribute in the tag can be positioned by @
Positioning by any unique attribute in a label
*[@placeholder = ' Please locate element by ID ']

Scope reduction through tagname
input[@placeholder = ' Please locate element by ID ']

Simultaneous multi-attribute positioning
input[@class = ' classname ' and @placeholder = ' locate element through classname ']

If you have to use a corner label for positioning via CSS selector You can choose to use XPath because CSS selector does not support corner positioning

1, Firefox browser Firebug firepath
2, Python installation Selenium
3, download Firefox, Google, ie drive and adjust
From selenium import Webdriver
Driver = Webdriver. Chrome ()
Driver.get (' ')

InnerText, InnerHTML

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.