gpt4 book ai didi

javascript - 如何测试 CasperJS 中是否存在选择器?

转载 作者:可可西里 更新时间:2023-11-01 01:22:35 28 4
gpt4 key购买 nike

我知道我可以使用:

casper.test.assertExists(#selector);

但我想实际存储它是否存在于 bool 变量中。

即像这样:

var exists = SelectorExists(#selector);

最佳答案

我刚刚发现:

if(!casper.exists('#selector')){
#selector doesn't exist
}

关于javascript - 如何测试 CasperJS 中是否存在选择器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12253623/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com