Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
Posts : 1
Join date : 2017-10-05

How find any text in browser screen and click on it? Empty How find any text in browser screen and click on it?

on Thu Oct 05, 2017 2:02 pm
Ok so i am trying to automate something, I am using selenium and python. I know i can find text by XPath , css selectors , by link_text or other method indeed i tried all but the website using very powerful security in their coding like:
class id change after every refresh so your previous xpath , css selector will not work for next refresh of same page.
send button doesn't appear until you type something from the keyboard , they are using keypress event, if you try to execute js and try to fill via .innerHTML or value="etc then message box disappear instant. For more info visit: Tekslate
since class id and name change after every refresh so .send_keys() also not working with this.
while inspect element their code is showing css but the opening source code of that page shows only a js script nothing else.
so what i tried is a python module which clicks on basis on coordinate. I tried to find string coordinate then click on it , Its working but the problem is for this i have to go to that browser page and bring front that browser page otherwise coordinate type the letter anywhere on current screen no matter current screen is youtube or current screen is pycharm etc. so i am finding a way where i don't have to bring that browser page at front while i am working on another window of any software. script do this as backend. I want something: find a text on current screen (not from source code) browser (in the same session which selenium is using) and click on it or if possible can I modify this script so this script clicks on those coordinate on that browser page in the back-end.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum