开发者

xpath in selenium took 2 min to execute

I have a table and I am trying to get the no of rows in table. But following statement took too 开发者_如何学Pythonmuch time to execute. Dim NumOfRows As Integer = selenium.GetXpathCount("//table[@id='Group']/tbody/tr")

any idea what is taking too long


I'm guessing you must be using IE? The xpath performance is horrific for things like this, and you'll no doubt run into more performance issues. My advice is to simply get the entire DOM out of selenium and parse it yourself with html agility.

http://htmlagilitypack.codeplex.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜