硒可以模拟单击而无需加载链接?
我正在研究一个试图自主监视Angular网站上的商品价格的项目。
这是与特定物品的链接:
https://www.< site-name&gt; .com/categories/categories/&lt sub-category&gt;/products?prodnum = 99999999
使用Selenium使用Selenium (在Python中)在带有产品列表的页面上,我可以获得有关项目的一些有用信息,但是我真正想要的是prodnum
参数。 onclick
项目的属性= clickonItem(item,$ index)
。 我确实有一些有关项目的信息信息,包括item
和$ index
值在HTML中可见,但是我怀疑有一种方法可以看到一种方法可以查看实际是什么发生在ClickOnItem
中。
我尝试使用Dev-Tool四处寻找ClickOnItem
定义的位置,但我还没有成功。
考虑到我看不到任何方法可以获取prodnum
而无需单击,我想知道,有一种方法可以模拟单击以查看将其重定向到的位置,但没有实际加载链接 - 因为这会花太多时间来为每个项目做吗?
注意:我想获得特定的prodnumber
。我希望能够直接访问项目页面,而无需首先使用主列表页面。
I'm working on a project trying to autonomously monitor item prices on an Angular website.
Here's what a link to a particular item would look like:
https://www.<site-name>.com/categories/<sub-category>/products?prodNum=9999999
Using Selenium (in Python) on a page with product listings, I can get some useful information about the items, but what I really want is the prodNum
parameter.
The onClick
attribute for the items = clickOnItem(item, $index)
.
I do have some information for items including the presumable item
and $index
values which are visible within the html, but I'm doubtful there is a way of seeing what is actually happening in clickOnItem
.
I've tried looking around using dev-tools to find where clickOnItem
is defined, but I haven't been successful.
Considering that I don't see any way of getting prodNum
without clicking, I'm wondering, is there's a way I could simulate a click to see where it would redirect to, but without actually loading the link- as this would take way too much time to do for each item?
Note: I want to get the specific prodNumber
. I want to be able to hit the item page directly without first going though the main listing page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论