Title: Theory / Important / Chrome / Test / JS
On every note of this deck, unless a note says otherwise:
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/web/public/test/element_selector.h;l=15?q=ElementSelector&ss=chromium%2Fchromium%2Fsrc

Typ: ElementSelector
Meaning: generate the proper javascript to retrieve an element on a web page. It encapsulates the various means of finding an element and is intended to be passed around.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey_app_interface.h
Language: Objective-C
Context: chrome
Library: chrome_test_util

Variable: ElementSelector.selectorScript
Meaning: The javascript to invoke on a page to retrieve the element.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/web/public/test/element_selector.h;l=15?q=ElementSelector&ss=chromium/chromium/src
Context: chrome
Language: Objective-C
Library: chrome_test_util

Variable: ElementSelector.selectorDescription
Meaning: A human readable description of the query.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/web/public/test/element_selector.h;l=15?q=ElementSelector&ss=chromium/chromium/src
Context: chrome
Language: Objective-C

Instruction: [ElementSelector
  selectorWithElementID:elementID
]
Language: Objective-C
Context: chrome
Returns: an ElementSelector to retrieve an element by ID.

Instruction: [ElementSelector
  selectorWithElementID:elementID
  inFrameWithIndex:frameIndex
]
Language: Objective-C
Context: chrome
Returns: an ElementSelector to retrieve an element in iframe by ID. iframe is an immediate child of the main frame with the given index. The script of this selector will throw an exception if target iframe has a different origin from the main frame.
Library: chrome_test_util

Instruction: [ElementSelector
  selectorWithCSSSelector:selector
]
Language: Objective-C
Context: chrome
Returns: an ElementSelector to retrieve an element by a CSS selector.

Instruction: [ElementSelector
  selectorWithXPathQuery:query
]
Language: Objective-C
Context: chrome
Returns: an ElementSelector to retrieve an element by a xpath query

Instruction: [ElementSelector
  selectorWithScript:selectorScript
  selectorDescription:selectorDescription
]
Language: Objective-C
Context: chrome
Returns: an ElementSelector to retrieve an element described by |selectorDescription| using |selectorScript|
Library: chrome_test_util

Instruction: todo: other files of this folder
Language: Objective-C
Context: chrome