我正在尝试使用Powershell在Firefox中查找,选择并单击特定的超链接。
我已经能够通过.links找到所有可用的超链接。我不确定如何选择所需的超链接以及如何单击它。
$azr = Invoke-WebRequest -uri "https://Website/" -SessionVariable sbv
$sbv
$azr.Links
这是用于打字测试网站的。有一个链接说开始输入测试,这就是我要单击的内容。我只是不确定如何在使用.Links生成的所有HTML中选择它,以及如何单击它。
答案 0 :(得分:1)
您要通话的内容根本没有使用浏览器。
在浏览器中,这是很常见的事情,有据可查并被询问。因此,您的查询可能会被视为与此查询的重复,并且已被接受。
Click a hyperlink using powershell
class Test
{
private:
struct Compare
{
bool operator()(const int lhs, const int rhs) const /* noexcept */ { return lhs > rhs; }
};
public:
using list = std::multiset<int, Compare>;
std::map<std::string, list> scripts;
};
现在,以上内容是针对IE的,因此,您将对其他浏览器执行相同的操作。
使用Invoke-WebRequest,然后在此处进行讨论和示例: