Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道我可以使用:
casper.test.assertExists(#selector);
但我想实际存储它是否存在于布尔变量中。
即是这样的:
var exists = SelectorExists(#selector);
我刚发现:
if(!casper.exists('#selector')){ #selector doesn't exist }