Skip to content

Latest commit

 

History

History
43 lines (39 loc) · 1.51 KB

File metadata and controls

43 lines (39 loc) · 1.51 KB
title linkTitle weight description
Waiting with Expected Conditions
Expected Conditions
1
These are classes used to describe what needs to be waited for.

Expected Conditions are used with [Explicit Waits]({{< ref "../waits#explicit-waits" >}}). Instead of defining the block of code to be executed with a lambda, an expected conditions method can be created to represent common things that get waited on. Some methods take locators as arguments, others take elements as arguments.

These methods can include conditions such as:

  • element exists
  • element is stale
  • element is visible
  • text is visible
  • title contains specified value

{{< tabpane text=true langEqualsHeader=true >}} {{% tab header="Java" %}} Expected Conditions Documentation {{< badge-code >}} {{% /tab %}} {{< tab header="Python" >}} Expected Conditions Documentation {{< badge-code >}} {{< /tab >}} {{< tab header="CSharp" >}} .NET stopped supporting Expected Conditions in Selenium 4 to minimize maintenance hassle and redundancy. {{< /tab >}} {{< tab header="Ruby" >}} Ruby makes frequent use of blocks, procs and lambdas and does not need Expected Conditions classes {{< /tab >}} {{< tab header="JavaScript" >}} {{< badge-code >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} {{< /tab >}} {{< /tabpane >}}