[selenium-users] Please help me My automation script pass locally but fail on Azure pipeline

27 views
Skip to first unread message

Priya Bansal

unread,
May 1, 2021, 4:51:28 AM5/1/21
to seleniu...@googlegroups.com
Hello Everyone,
My automation script  pass locally but fail on Azure pipeline , getting no such element found.
         Please help me, how to resolve the problem.
Already I am using Thread.sleep(30000) but it is not working.

Thanks in Advance


 

Shruti

unread,
May 1, 2021, 10:00:17 AM5/1/21
to Selenium Users
Best to stay away from hard-coded Thread.sleeps() in your code. Selenium instead provides many explicit and implicit waits that will wait for the element to reach a particular state like visible, not visible, enabled, disabled, etc. You could ready more about them in Selenum documentation:

Priya Bansal

unread,
May 1, 2021, 10:22:57 AM5/1/21
to seleniu...@googlegroups.com
Already used thread.sleep and explicitly wait and click element by java script but it is not working

--
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/3d1e8641-7291-4f48-aa10-8a91c6138bacn%40googlegroups.com.

Aniket Mane

unread,
May 1, 2021, 10:38:23 AM5/1/21
to seleniu...@googlegroups.com
Hi Priya,

Can you please add full error log here?

Thanks,
Aniket

Thabang Rapotu

unread,
May 3, 2021, 4:18:47 AM5/3/21
to seleniu...@googlegroups.com
Another way is to use the wait method or if object.hasexited event. I will also encourage to use while loop with condition pointing for object or element to exist. Before while loop you can as well add a delay of milliseconds. 

--
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.
Reply all
Reply to author
Forward
0 new messages