-
Jan 19th, 2021, 06:57 AM
#1
Thread Starter
New Member
Unable to find webelement in selenium chromedriver using xpath
I am trying to read messages of telegram from telegram web. I am using vb.net and Selenium chrome webdriver. I can successfully read the last message of any opened chat by the following lines
Dim ie As IWebElement = drivert.FindElement(By.XPath("(//div[@class='im_message_text']) [last()]"))
However, when I change the chat on the web manually, it is unable to find the element.
If I once again go back to the first chat, it finds the element. So, basically after launching webdriver, it reads one chat and sticks to it. If I receive a new message in that chat, it read the new message. However, switching the chat makes it unable to find element. It is due to the changed URL whuile switching between the chats?
PS : I am defining ie webelement every time I press the read button in my application.
-
Jan 26th, 2021, 11:33 AM
#2
Re: Unable to find webelement in selenium chromedriver using xpath
Hello hardik2309,
Is this of any use? https://core.telegram.org Also could you post a working example of what you are trying to do?
yours,
Peter Swinkels
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|