mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-15 07:05:21 +08:00
window自动化分类:1.新增选择窗口(inspect),支持高亮指定元素,并查看元素的名称、类型、句柄、xpath等各项属性及所在窗口各项属性 2.新增界面自动化,支持通过xpath、name、id等条件在对指定元素执行点击、设置值、模拟输入、高亮等操作
This commit is contained in:
@@ -113,15 +113,13 @@ const buildCsharpFeature = async (feature) => {
|
||||
|
||||
fs.copyFile(srcCsPath, destCsPath, (err) => {
|
||||
if (err) return reject(err.toString());
|
||||
child_process.exec(
|
||||
`${cscPath} /nologo ${references}/out:"${exePath}" "${destCsPath}"`,
|
||||
{ encoding: null },
|
||||
(err, stdout) => {
|
||||
if (err) return reject(iconv.decode(stdout, "gbk"));
|
||||
else resolve(iconv.decode(stdout, "gbk"));
|
||||
fs.unlink(destCsPath, () => {});
|
||||
}
|
||||
);
|
||||
const command = `${cscPath} /nologo ${references}/out:"${exePath}" "${destCsPath}"`;
|
||||
console.log(command);
|
||||
child_process.exec(command, { encoding: null }, (err, stdout) => {
|
||||
if (err) return reject(iconv.decode(stdout, "gbk"));
|
||||
else resolve(iconv.decode(stdout, "gbk"));
|
||||
fs.unlink(destCsPath, () => {});
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -181,6 +179,11 @@ const runCsharpFeature = async (feature, args = [], options = {}) => {
|
||||
encoding: null,
|
||||
},
|
||||
(err, stdout, stderr) => {
|
||||
console.log({
|
||||
err,
|
||||
stdout: iconv.decode(stdout, "gbk"),
|
||||
stderr: iconv.decode(stderr, "gbk"),
|
||||
});
|
||||
if (err || Buffer.byteLength(stderr) > 0)
|
||||
reject(iconv.decode(stderr || stdout, "gbk"));
|
||||
else reslove(iconv.decode(stdout, "gbk"));
|
||||
|
||||
Reference in New Issue
Block a user