我收到有关在我的构建中使用已弃用功能的警告.有没有办法列出所有已弃用的功能,以便我可以通过并更新我的代码?
*澄清
我知道我可以去gradle文档,看看现在已经弃用了什么,我特别想要的是通过我的代码并列出我不赞成使用的功能.
我在处理 gradle 中的特定 junit 测试时遇到了一个不寻常的问题。当我按如下方式运行测试时,它通过了
gradlew 测试 --tests com.compsci.ic.xbrl.SchemaRefTest
然而当我跑步时
梯度测试
它失败并显示以下堆栈跟踪
java.lang.IllegalStateException: Undeclared namespace prefix in DOM input: link
at net.sf.saxon.dom.NodeWrapper.getURI(NodeWrapper.java:531)
at net.sf.saxon.dom.NodeWrapper.getNameCode(NodeWrapper.java:412)
at net.sf.saxon.om.Navigator.copy(Navigator.java:523)
at net.sf.saxon.dom.NodeWrapper.copy(NodeWrapper.java:827)
at net.sf.saxon.om.Navigator.copy(Navigator.java:516)
at net.sf.saxon.dom.NodeWrapper.copy(NodeWrapper.java:827)
at net.sf.saxon.om.StrippedNode.copy(StrippedNode.java:448)
at net.sf.saxon.instruct.CopyOf.processLeavingTail(CopyOf.java:397)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
at net.sf.saxon.Controller.transformDocument(Controller.java:1735)
at net.sf.saxon.Controller.transform(Controller.java:1559)
at org.custommonkey.xmlunit.Transform.transformTo(Transform.java:211)
at org.custommonkey.xmlunit.Transform.getResultDocument(Transform.java:233)
at org.custommonkey.xmlunit.XMLUnit.stripWhiteSpaceUsingXSLT(XMLUnit.java:514)
at org.custommonkey.xmlunit.XMLUnit.getWhitespaceStrippedDocument(XMLUnit.java:507)
at org.custommonkey.xmlunit.Diff.getWhitespaceManipulatedDocument(Diff.java:182)
at org.custommonkey.xmlunit.Diff.getManipulatedDocument(Diff.java:203)
at org.custommonkey.xmlunit.Diff.<init>(Diff.java:155)
at org.custommonkey.xmlunit.Diff.<init>(Diff.java:145)
at org.custommonkey.xmlunit.Diff.<init>(Diff.java:109)
at org.custommonkey.xmlunit.Diff.<init>(Diff.java:101)
at org.custommonkey.xmlunit.Diff.<init>(Diff.java:93)
at org.custommonkey.xmlunit.XMLAssert.assertXMLEqual(XMLAssert.java:228)
at org.custommonkey.xmlunit.XMLAssert.assertXMLEqual(XMLAssert.java:179)
at com.compsci.ic.xbrl.SchemaRefTest.testSerialize(SchemaRefTest.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at …Run Code Online (Sandbox Code Playgroud) 我正在使用带有retirejs的owasp依赖工具,并且我试图弄清楚如何在我的构建中排除整个文件夹。现在我就这样了
dependencyCheck{
outputDirectory = "${projectDir}/reports"
suppressionFile = "${projectDir}/gradle/owasp_config/suppress.xml"
analyzers {
experimentalEnabled = true
assemblyEnabled = false
retirejs {
filterNonVulnerable = true
}
}
scanSet = ['build/deploy/scripts']
}
Run Code Online (Sandbox Code Playgroud)
但在 scanSet 中有一个包含 yui 的文件夹,我想在扫描过程中完全忽略它。我可以在抑制文件中抑制单个 cve,但它们有 300 多个,因此全局排除将是一个更好的解决方案。
我目前正在使用 Python 和 selenium 来监视对 pbx 的更改。我需要的值正在被 javascript 调用调用,但实际上并未写入 html,因此我对如何提取该值有点困惑。如果我检查元素,这就是我所看到的
<input class="SEditorInputText" id="extension_4" maxlength="15" onkeyup="javascript:onEditNumber(this);" onchange="javascript:onPropertyChange(this);" type="text">
Run Code Online (Sandbox Code Playgroud)
在网页上,它显示号码 1001,这是我们的寻线组号码。我假设该数字是由onkeyup="javascript:onEditNumber(this)函数生成的,如果是这样,是否有办法将输出发送到控制台,以便我可以评估分配的数字?
到目前为止,这是我的硒代码
#!/usr/bin/env python
import time
import sys, urllib2
from selenium import webdriver
driver = webdriver.Firefox()
login_username = '<username>'
login_password = '<password>'
url = '<login Url>'
scripts = '<scripts Url>'
driver.get(url)
username = driver.find_element_by_name("username")
password = driver.find_element_by_name("password")
username.send_keys(login_username)
password.send_keys(login_password)
link = driver.find_element_by_name("loginbutton")
link.click()
driver.get(scripts)
aa = driver.find_element_by_xpath(".//input[contains(@onclick, 'compsci-main-aa.aef')]").click()
opt1 = driver.find_element_by_id('extension_4')
Run Code Online (Sandbox Code Playgroud)
到目前为止,它按预期进入相关部分,但就像我之前提到的那样,我需要该变量的值。完成后,此脚本将无头运行。
提前致谢。