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/
精彩评论