Exemple #1
0
 def m_setPointerCapture(self):
     return "%s.pointerId" % r.Element()
Exemple #2
0
 def m_showModal(self):
     return r.choice(["", r.Element(), r.EvtObj()])
Exemple #3
0
 def m_hasAttributeNS(self):
     namespaceURI = r.URI()
     localName = ("%s.localName") % r.Element()
     return "'%s', %s" % (namespaceURI, localName)
Exemple #4
0
 def m_releasePointerCapture(self):
     return "%s.pointerId" % r.Element()
Exemple #5
0
 def m_replaceWith(self):
     node = r.Element()
     text = r.DOMString(r.zint(256))
     return r.choice(["'%s'" % text, node])
Exemple #6
0
 def m_getElementsByTagNameNS(self):
     namespaceURI = r.URI()
     localName = ("%s.localName") % r.Element()
     return "'%s', %s" % (namespaceURI, localName)
Exemple #7
0
 def m_before(self):
     node = r.Element()
     text = r.DOMString(r.zint(256))
     return r.choice(["'%s'" % text, node])
Exemple #8
0
 def m_querySelectorAll(self):
     # 找出所有匹配的节点并返回数组
     selectors = randoms.choice(
         [randoms.HTMLTags(), randoms.Element(), "*"])
     return "'%s'" % selectors
Exemple #9
0
 def m_querySelector(self):
     # 找到一个后就返回节点对象
     selectors = randoms.choice(
         [randoms.HTMLTags(), randoms.Element(), "*"])
     return "'%s'" % selectors
Exemple #10
0
 def m_queryAll(self):
     n = randoms.choice([randoms.HTMLTags(), randoms.Element(), "'*'"])
     return "'%s'" % n
Exemple #11
0
 def m_prepend(self):
     # 将指定元素插入匹配元素内部的开头
     node = randoms.Element()
     text = randoms.DOMString(randoms.zint(256))
     return "'%s'" % randoms.choice([node, text])