如何将XPath转换为JQuery代码

时间:2015-09-29 14:43:43

标签: jquery xpath

我是JQuery的新手。 帮我翻译下面的代码到JQuery

"Condition": {
  "StringEquals": {
    "ec2:ResourceTag/Name": ["tag1","tag2","tag3"]
  }
}

以下代码是否正确?

fol_div_siblings=heading.find_elements_by_xpath('following-sibling::div')
for fol_div_sibling in fol_div_siblings:
    #if the children has form element
    form_child=fol_div_sibling.find_elements_by_xpath('child::form')
    if (len(form_child)!=0):
        return True

0 个答案:

没有答案