ExpectedCondition - ElementSelectionStateToBe , Selenium - C#

77 views
Skip to first unread message

Virender Chauhan

unread,
Dec 31, 2020, 4:30:27 AM12/31/20
to Selenium Users
Hi Fellow members,

In Selenium-C#, 
1) Has anyone used ExpectedCondition mentioned below or anyone having understanding of this part.  

     

ElementSelectionStateToBe(By, Boolean)

An expectation for checking if the given element is in the correct state.

OR

ElementSelectionStateToBe(IWebElement, Boolean)

An expectation for checking if the given element is in the correct state.


2) Also any idea about when do we get below exception:
    NoSuchContextException  

  Please help to understand.  
 
Reference Url : https://www.selenium.dev/selenium/docs/api/dotnet/html/T_OpenQA_Selenium_Support_UI_ExpectedConditions.htm



Thanks and Regards,
--------------------------------------------------------
Virender Kumar

Virender Chauhan

unread,
Jan 1, 2021, 2:41:17 AM1/1/21
to seleniu...@googlegroups.com
<<Gentle Reminder>>

Thanks and Regards,
--------------------------------------------------------
Virender Kumar
Cigniti Technologies Ltd


--
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/d5f45255-a0eb-4bd3-8805-3b8fe6bd760bo%40googlegroups.com.

venkatesh iyengar

unread,
Jan 1, 2021, 3:20:49 AM1/1/21
to seleniu...@googlegroups.com
Happy Afternoon Virender,

Below condition can check the state of button , link like enabled or disabled first by giving locator information and other one is for passing webelement information.

Regards,
Venkatesh

On Thu, Dec 31, 2020 at 3:00 PM Virender Chauhan <vc3...@gmail.com> wrote:
--

Virender Chauhan

unread,
Jan 1, 2021, 8:47:13 AM1/1/21
to seleniu...@googlegroups.com
Thanks for your reply  Venkatesh. Any experience using these conditions?  
I thought  ElementSelectionStateToBe(By, Boolean)  will be used for checking Selection state for Radio buttons/ Check boxes.

Thanks and Regards,
--------------------------------------------------------
Virender Kumar
Cigniti Technologies Ltd

venkatesh iyengar

unread,
Jan 3, 2021, 5:01:53 AM1/3/21
to seleniu...@googlegroups.com
Happy Evenings,
Your are right about the below expected conditions that they are used to verify the select state of radio button and check box. I tried to reach you on your mobile number but could not reach you.

Regards,
Venkatesh

Reply all
Reply to author
Forward
0 new messages