Click on Search icon using selenium

331 views
Skip to first unread message

meena

unread,
Mar 11, 2014, 4:46:08 AM3/11/14
to seleniu...@googlegroups.com
I am testing "http://www.YouTube.com" using webdriver on android phone.
However I am trying to click on Search icon but it is not working.
I have tried following commands but no success plz help

element =driver.find_elements_by_id("seach-btn")    OR
element =driver.find_elements_by_id("masthead-serach-term")
element.click()

Jaya

unread,
Mar 11, 2014, 1:39:51 PM3/11/14
to seleniu...@googlegroups.com
Hi,

Can you try this and let me know if it worked: "css=form#masthead-search>button"
Use By.CssSelector

Thanks,
Jaya.

meena

unread,
Mar 12, 2014, 2:55:05 AM3/12/14
to seleniu...@googlegroups.com
hey thanks..but it didnt work...

Any other way to find " ids " on the phone..
I am sucussfully able to get all the text but not ids

meena

unread,
Mar 12, 2014, 4:54:49 AM3/12/14
to seleniu...@googlegroups.com

Please check I am not able to get click on these two icons from android phone...
Attached the image for the same..For these  icons I am not able to get anything.. :(



On Tuesday, March 11, 2014 11:09:51 PM UTC+5:30, Jaya wrote:
1.png

Doug Dragon

unread,
Mar 12, 2014, 4:57:33 PM3/12/14
to seleniu...@googlegroups.com
For the search icon, looks like it has a child ("span._mjf _mpf") - maybe that would work? I haven't tried it b/c I don't have selenium for mobile but maybe that will work?
Reply all
Reply to author
Forward
0 new messages