nikgoodley-ibboost / aost

Automatically exported from code.google.com/p/aost
0 stars 0 forks source link

Need to add direct attribute #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes, the generated xpath returns a lot of nodes because there are a
lot of similar nodes. One example is the page

http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official

The log is as follows,

# [debug] Building Inner Tree -> add Element UID: input0 XPATH:
/html/body/center/form/table[@id='frame']/tbody/tr[3]/td/table/tbody/tr/td[2]/ta
ble/tbody/tr/td[2]/table[2]/tbody/tr/td[1]/input[@id='sf']
DomNode: INPUT
# [debug] Building Inner Tree -> add Element UID: a1 XPATH:
/html/body/center/form/table[@id='frame']/tbody/tr[3]/td/table/tbody/tr/td[2]/ta
ble/tbody/tr/td[2]/table[2]/tbody/tr/td[2]/font/a[1]
DomNode: A
# [debug] Building Inner Tree -> add Element UID: a2 XPATH:
/html/body/center/form/table[@id='frame']/tbody/tr[3]/td/table/tbody/tr/td[2]/ta
ble/tbody/tr/td[2]/table[2]/tbody/tr/td[2]/font/a[2]
DomNode: A
# [debug] Building Inner Tree -> add Element UID: input3 XPATH:
/html/body/center/form/table[@id='frame']/tbody/tr[3]/td/table/tbody/tr/td[2]/ta
ble/tbody/tr/td[2]/table[2]/tbody/tr/td[1]/input[6]
DomNode: INPUT
# [debug] Building Inner Tree -> add Element UID: div4 XPATH:
/html/body/center/form/table[@id='frame']/tbody/tr[3]/td/table/tbody/tr/td[2]/ta
ble/tbody/tr/td[2]/table[1]/tbody/tr/td[1]/div
DomNode: DIV
# [debug] start to validate UI object's xpath
# [warn] The XPath for Node root //descendant-or-self::table returned 10
nodes, failed validation
# [warn] The XPath for Node T4ttt
//descendant-or-self::table/descendant-or-self::table returned 10 nodes,
failed validation
# [warn] The XPath for Node T4tf
//descendant-or-self::table/descendant-or-self::table/descendant-or-self::td 
returned
30 nodes, failed validation
# [debug] The XPath for Node a1
//descendant-or-self::table/descendant-or-self::table/descendant-or-self::td/des
cendant-or-self::a[normalize-space(text())=normalize-space("Advanced
Search") and @href="/advanced_search?hl=en"] returned 1 nodes, passed
validation
# [debug] The XPath for Node a2
//descendant-or-self::table/descendant-or-self::table/descendant-or-self::td/des
cendant-or-self::a[normalize-space(text())=normalize-space("Preferences")
and @href="/preferences?hl=en"] returned 1 nodes, passed validation
# [warn] The XPath for Node T4t
//descendant-or-self::table/descendant-or-self::table/descendant-or-self::td 
returned
30 nodes, failed validation
# [debug] The XPath for Node input0
//descendant-or-self::table/descendant-or-self::table/descendant-or-self::td/des
cendant-or-self::input[@name="q"
and @id="sf"] returned 1 nodes, passed validation
# [debug] The XPath for Node input3
//descendant-or-self::table/descendant-or-self::table/descendant-or-self::td/des
cendant-or-self::input[@type="submit"
and @name="btnG" and @value="Google Search"] returned 1 nodes, passed
validation
# [debug] The XPath for Node div4
//descendant-or-self::table/descendant-or-self::div[@title="Google"]
returned 1 nodes, passed validation
# [debug] Done validating UI object's XPath 

Original issue reported on code.google.com by John.Jian.Fang@gmail.com on 20 Feb 2009 at 9:13

GoogleCodeExporter commented 9 years ago
The direct should not be an optional attribute and will be decided by TrUMP 
itself
based on the condition that all current node's children do not have the header
attribute and connect to the current node directly. When user update the UI 
module,
this attribute should keep intact.

Original comment by John.Jian.Fang@gmail.com on 21 Feb 2009 at 12:03

GoogleCodeExporter commented 9 years ago

Original comment by John.Jian.Fang@gmail.com on 21 Feb 2009 at 8:51