NoSuchElementException

50 views
Skip to first unread message

sravya pudota

unread,
Feb 2, 2016, 6:29:23 AM2/2/16
to Selenium Users
Hi,
I'm using Selenium 2.48.2.I'm trying to find the element by 'id'.I'm getting an exception NoSuchElementException. I tried by using waits concept ,thread sleep but could not solve this issue.
I'm working in a startup company, i'm the only person in testing team doing automation testing.So please help me out to solve this issue.
Thank you,
-Sravya
Screenshot_1.png
Screenshot_2.png

saba. s

unread,
Feb 2, 2016, 6:41:10 AM2/2/16
to seleniu...@googlegroups.com
Seems to be a Timeout issue. Use Thread.sleep(500) before driver.findElement(By.id("pswdid")).sendkeys("Sravya");
if it works better use Implicit wait instead Thread sleep

--
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 post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b561477c-be41-4152-af48-1fb3321bdd5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--







Thanks,
Kanaga sabapathy.M.S.

sravya pudota

unread,
Feb 2, 2016, 6:57:19 AM2/2/16
to seleniu...@googlegroups.com
Still facing the same issue.

saba. s

unread,
Feb 2, 2016, 7:00:38 AM2/2/16
to seleniu...@googlegroups.com
Could u share your code and Page source code


For more options, visit https://groups.google.com/d/optout.



--







Thanks,
Kanaga sabapathy.M.S.

sravya pudota

unread,
Feb 2, 2016, 7:18:42 AM2/2/16
to seleniu...@googlegroups.com
I attached code with this mail.
-Sravya

changePwdAdmin.txt
ChangePassword.java

Sudhansu Sekhar panda

unread,
Feb 2, 2016, 8:09:06 AM2/2/16
to Selenium Users
Hi Sravya,

Please use the WebDriver wait either explicit wait or  implicitwait or thread.sleep

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

I think use the Implicit wait for the timing being as you are beginner and learn about to explicitwait and using that how to wait for elements.

Thanks,

Sudhansu

Jegadeesh mani

unread,
Feb 2, 2016, 8:31:13 AM2/2/16
to seleniu...@googlegroups.com

Hi sravya,

Element does not located in iframe properly.

So once enter the password change page , the frame has been changed .

So switch the frame then try it will work.

Thanks,
Jegadeesh

--
Reply all
Reply to author
Forward
0 new messages