Try For Each webElement2 As IWebElement In Me.driv.FindElements(By.XPath("//*[@class='MVVflb-haAclf V0h1Ob-haAclf-d6wfac MVVflb-haAclf-uxVfW-hSRGPd']")) Dim flag2 As Boolean = Operators.CompareString(Me.ttt.Text, "", False) = 0 If flag2 Then Me.ttt.Text = webElement2.ToString Else Me.ttt.AppendText(Environment.NewLine + webElement2.ToString()) End If Application.DoEvents() Next Catch ex As Exception End Try Dim flag3 As Boolean = Me.nnm <= Me.ttt.Lines.GetUpperBound(0) If flag3 Then Try For Each webElement3 As IWebElement In Me.driv.FindElements(By.Id(ttt.Lines(nnm))) Dim flag4 As Boolean = Operators.CompareString(webElement3.ToString(), Me.ttt.Lines(Me.nnm).ToString(), False) = 0 If flag4 Then Try webElement3.Click() Exit Try Catch ex3 As Exception End Try End If Next Catch ex As Exception End Try Me.Timer3.Start()
I solved the problem by replacing "ttt.Text = webElement2.ToString" with "ttt.Text = webElement2.GetAttribute("aria-label").ToString()"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)