Cant find web element by Xpath, CSS, ID ... I tried all

50 views
Skip to first unread message

Harman Singh

unread,
Jan 5, 2023, 5:34:09 AM1/5/23
to Selenium Users
Hi everyone, 

I am trying to send keys - Incident number for service now. I cant find the input box by any method . I have read about frames or frames, I couldn't find any frame. 
Search box is in the banner which stays there you go to any page in service now. Its called global search. 
am I missing anything. 
I am looking for advise. 

Thank you.


Dean Miller

unread,
Jan 5, 2023, 10:31:20 AM1/5/23
to Selenium Users
Could you send us the link to the page? Or a copy of the page source if password protected?

Adrian

unread,
Jan 8, 2023, 3:41:33 AM1/8/23
to Selenium Users
Yes, as Dean has said, a copy of the DOM showing the search will be very useful.
Do you know how to display the DOM?  If not let us know and we can instruct you.
Once you have located the DOM in the Dev Tools you can just right click and then select Copy XPath and paste that into your test.
I recommend against doing that, but it is useful to prove that it works.  Once proved it works then you should craft a better XPath that is not fragile.  The Copy XPath in the Dev Tools is great to find an element, but it results in tests that can easily be broken.  So NEVER use them in the final test.

Cheers,
Adrian.

王宏恩

unread,
Jan 17, 2023, 4:33:17 AM1/17/23
to seleniu...@googlegroups.com
I met the same question. i can record the page, but cant replay.
got Selenium-ide from chrome-extensions store
eg: record the https://www.bing.com.
Type anything in the search box, then click the search button, then close.All of the steps record normal,when replay, cant find the search box and cant type anything.
Can you tell me the reason and how to fix it?
Thanks!

Adrian <lord.s...@gmail.com> 于2023年1月8日周日 16:41写道:
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a235df13-ddaa-4df9-86fd-f34bcdbcf318n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages