Friday, June 16, 2017

The complete Checklist for Mobile Testing | David Tzemach

Overview

During the last few years we can see that the software industry is going mobile, we can see it in the massive app releases where thousands of new applications are becoming available for us per week and enterprise users will use their phones to connect remotely to their company's services such as Mail and file sharing.

I created this checklist that should be used as a baseline when testers need to deal with the increasing challenge of testing mobile applications. 

תוצאת תמונה עבור ‪mobile testing‬‏

Checklist


Preliminary Questions before starting the tests

  • What are the supported devices that we need to use in the testing process?
  • Do you have the hardware to support the tests (Real Device/Simulators)?
  • How do you think that people are going to use the application?
  • What is the code that was used to create the application?
  • What are the supported platforms that we need to use in the testing process (Symbian, iOS, Android etc.)?
  • Do you need to support tablets?
  • What is the application design?


Application interface

  • Validate that the application contains the company logo.
  • Validate that there are no spelling mistakes.
  • Validate all buttons and menus.
  • Validate all string and fonts.


Installation/uninstallation

  • Validate that you can uninstall the application.
  • Validate that you can reinstall the application.
  • Validate that you can install the application.
  • Validate that the application is not affected in a case of failure during the update process.
  • Validate that the user receives notification when the application is going to be uninstalled.
  • Validate that you notify when one of the predefined requirements (Disk Space, Permissions Etc.) is not fulfilled before the start of the installation process.


Application Updates

  • Validate that a new update will not affect the application performance.
  • Validate that the user receives only the relevant application updates.
  • Validate that the user is notified when a new update is available.
  • Validate that the application will support OS updates.
  • Can the user downgrade the System version?


Accessibility

  • Can the user manipulate the main functions using voice activation?
  • Validate that the color contrast can be changed.
  • Can the user use the Zoom in/out function?
  • Can the user change the size of the text?
  • What are the size screen buttons, will they allow the user to access the major functionalities?   


Security

  • Validate that the APP authentication process is secured (External Channels).
  • Validate that the default network that the application uses is secured.
  • How and where the application saves the user personal information?
  • How many log-in attempts are permitted prior to locking the app?
  • Validate that the user cannot access/modify the application files.
  • Validate that the application uses the relevant permissions.
  • Validate the application certificates (If relevant).
  • Validate that Device ID if used as an identifier.
  • The applications should not get access to the device information without the user approval.
  • Validate the user credentials before allowing him to access the App local information.
  • Validate that the user receives notification when he changes to unsecured network.
  • Validate that the APP is not storing any payment information (If it does, how well it's secured?).


Social and External connections

  • Can the user share the application data to external destinations (Files, Links etc.)?
  • Can the application be integrated with 3rd applications?
  • Can the user use the App to Log into remote services?
  • Can the user control the notification that he receives?
  • Test the integration between the app and different social networks (Twitter, Facebook etc.).


The Download Process

  • Can the user downloads the app at a reasonable time?
  • Is there any agreement/License that the user needs to sign/approve prior to download the application?
  • Validate that there is enough storage in the device prior to download the application.
  • Where is the source that the user can use to download the application (Website, AppStore etc.)?


Storage

  • What happens if the application cannot save data due to low space?
  • How the application beehives when the date is not accessible?
  • How the application beehives when the date is corrupted?
  • How the application backup and restore the user data?
  • What is the storage that the application uses to store data (Cloud, Local memory, SD card etc.)?


How the application handles interruptions?

  • Notifications from another application that is installed.
  • Connecting/Disconnecting the phone charger.
  • The User receives a Text message.
  • Music playing while using the app.
  • The User receives a phone call.
  • Switching between apps.
  • Voice mail notification.
  • System notifications.
  • Screen lock/unlock.
  • Battery warning.


Functional Testing

  • Validate that the application performs as defined in the requirements doc.
  • Validate that the user can start, Restart and close the application.
  • What is the expected behavior when the phone is locked?
  • Validate that the user can access all functions.
  • Validate that the user will follow the preliminary requirements prior to using the application (GPS, Wi-Fi etc.).
  • Validate that the application functionality on different orientation (Landscape/Portrait).
  • Validate that all functions will behave the same as used in a desktop version (If any).
  • Validate that the application displays informative errors in any case of failure.


Connectivity

  • Test the application with different networks (3G,4G etc.).
  • Does the Application interacts with the Device GPS?
  • Test the application with low connectivity.
  • Test the application with Airplane mode.
  • Test the application through a proxy.
  • Test the application with Wi-Fi.
  • Test the application with USB.
  • Test the application with NFS.
  • Test the application with BT.


Compatibility

  • Validate that the application can be used on different hardware versions.
  • Validate that the application supports different screen resolutions.
  • Validate that the application supports different time zones.
  • Validate that the application is multilingual.
  • Validate that the application can be used on different OS versions (Symbian, Android, Windows Mobile etc.).
  • Validate that the app supports different devices (Based on the predefined supported device list).
  • Validate that the application behavior is not affected when the user changes the Device settings.


Performance

  • Validate that the application is not consuming more memory than it should.
  • Test the application behavior with low memory in the device.
  • Test the application behavior with low CPU resources.
  • Validate the response time of the application.
  • In any case of performance degradation, you should display a notification to the user.

Friday, June 9, 2017

What is Equivalence Partitioning Technique? | David Tzemach

תוצאת תמונה עבור ‪equivalence partitioning‬‏

This Black-Box test technique can be used at any level of testing (Unit, Component, Integration and system). It is used to determine the set of valid and invalid inputs specified for the tested object and dividing it up into partitions of data inputs that according to the application requirements should behave the same when used as an input (the application behavior should be the same when tested with these inputs).

The main advantage of this method, is that it allows the tester to validate the tested object with a narrow set of test inputs because he will use a single condition from each class instead of all available inputs (remember that we assume that all inputs in a single class will behave the same, therefore we can test only single value).

The assumptions are:
If a single value from a class is working, then we can assume that all values of the class will work the same once used as input.

If a single value from a class is NOT working, then we need to validate the object with further inputs of the same class. 

Advantages
  • The probability of uncovering defects with the selected test inputs are higher.
  • We will cover different domain inputs (Valid/Invalid).
  • We will reduce the number of test cases.
  • We will reduce the testing time.

Disadvantages
There is one main disadvantage in ECP that you must remember, assuming in testing is a big mistake! Therefore, you should use this method wisely, and test more than a single value if you know that a specific area has more chances to trigger defects or when you know that there is a higher risk.  

So How can we use this method?
The tested object is an input field where the user needs to specify is age, the requirements are: 
  • The user can insert any number between 25 – 100.
  • The user can insert any number between 5 – 15.
  • The user cannot use negative numbers.

As you can see, we will not want to test all inputs that are available for testing; therefore, we will use the EP method to create the following partitions:

Class no'1: 25 <= Input <= 100 (Positive)
Class no'2: 5 <= Input <= 15 (Positive)
Class no'3: 16 <= Input <= 24 (Invalid)
Class no'4: Input > 100 (Invalid)
Class no'5: Input < 0 (Invalid)
Class no'6: 0 <= Input <= 4 (Invalid)

Now, all you need to do to validate the tested input field is to use one set of dates that belongs to each partition (six values in total), and you can see, we covered the main scenarios in 6 tests instead of running a large number of tests that will not add any real benefit/value to the testing effort.

Thursday, June 8, 2017

Selenium WebDriver - How to Identify Web Elements Using Selenium XPath (Text Method)

Sometimes, you will need to locate elements that do not contain any attributes, this issue will make it really difficult to locate those elements in the ordinary strategies.

To overcome this issue, we can use the XPath/CSS text methods that will help us to locate elements using a particular text value.

When using the text function, the locator query the element for its text content and if the element contains the relevant text, it will return the element.
תוצאת תמונה עבור ‪selenium webdriver‬‏


Code Examples


HTML:
<a href="http://www.machtested.com/p/blog-page_11.html">Quality Assurance</a>

Locating elements using exact text value

On the following example, we will specify the full text of the element which will be used by the XPath locator.

WebElement = Firefox.FindElement(By.XPath("//a[.='Quality Assurance']"));

Locating elements using the text function

The text () will return the full string of the element, and the "Contains" filter will validates if the requested string is matched to the search query.

Code:

WebElement = Firefox.FindElement(By.XPath("//a[contains(text(),'Assurance')]"));
Or
WebElement = Firefox.FindElement(By.XPath("//a[contains(text(),'Quality')]"));



Monday, May 29, 2017

Scrum Teams - Empower from Mediocrity to Greatness

Thousands of words are already written about the importance of the scrum teams to the success of the scrum process, in this article I want to review the main criteria that transform scrum teams from mediocrity to greatness.

During this article, we will be questioning the traditional artifacts (Daily meetings, retrospectives Etc.) of the scrum process and describe how great scrum teams can perform a superior work without using them.

תוצאת תמונה עבור ‪Empower from Mediocrity to Greatness‬‏

The role of scrum team in scrum process (Agile Manifesto)

“…Scrum is a team-based approach to delivering value to the business. Team members work together to achieve a shared business goal. The Scrum framework promotes effective interaction between team members so the team delivers value to the business…”.

Overview

Now, these definition is great on paper but if you have experience in the practical side of working with scrum teams, you probably know that there are so many aspects that stabilize the mediocrity of some of the teams and in other words are keeping them to perform better.

Now, based on my experience, you can transform almost any team to perform better, it may take some time and a lot of education, but know that you can, the transformation can be achieved if your team has the spirit and commitment, the technical side is always easier J

Scrum teams -  The road from Mediocrity to Greatness

Let’s review some of the main criteria that will justify the word “greatness” in a context of “Scrum” team.

Know how to make fun with each other

Although it seems simple, a good relationship among the team members is probably the main key for a great team, team members that know how to interact, collaborate and simple have fun with each other will be by far more productive than a team with an unpleasant atmosphere.

Team ownership on the Product backlog

The product Backlog is created and maintained by the product owner (There Is no dispute about it.), but although this ownership, a great scrum team will make sure that they have a full involvement in the process of refining the backlog because they understand that a quality and maintain backlog will affect the overall project development goals.

Story points are belonging to the past

Another major process in a scrum process is to measure the work effort using story points instead of the traditional H/D work effort, great scrum teams don’t need story points, they have the knowledge and expertise to understand the amount of work they can commit per sprint.

Neglecting Criticism

One of the major pitfalls of any scrum team is occurring when the team members are wasting their time to criticize other team members (Especially on the retrospective meeting) to justify their own failures, a great scrum team will have team members that will criticize only the process and the ideas related to it, because they understand that personal criticism will most likely cause more damage that it will help.

Collective Ownership as a fact and not as slogan

To understand the importance of collective ownership, just think about a special army unit that goes behind enemy lines, can they succeed their mission without the sense of ownership for both their partners and for the mission goals? Think about scrum teams, they are not so different, without the ownership to the other team members and for the project goals, they will most likely fail to succeed with their mission.

A true collective ownership should start from the perspective that all team members are equal, there is no need to define a specific “Roles” within the team because they know that they have a collective ownership to the success of the project, Roles are meant for those who want to separate themselves from others and therefore are not relevant to a truly great team.

Definition of done is for those who fail to understand it

Definition of done (DOD) is a definition of criteria that should be accomplished prior to the team can mark the story/task as done, a great scrum team have the knowledge and confidence about the DOD and therefore allowing them to exclude the definition of DOD from the project stories and tasks.   

Why do we need Sprint 0?

Sprint 0 is the sprint were the team establish the main artifacts of scrum (Backlogs, Roles, Risk assessments, Etc.), great scrum teams will exclude this sprint from their process because they can deliver business value already in the first sprint.

Knows the power of the team swarming method

Definition(Swarming):

“A behavior whereby team members with available capacity and appropriate skills collectively work (swarm) on an item to finish what has already been started before moving ahead to begin work on new items”.

A great scrum team will master this concept because they understand that this method will provide them a better chance to achieve the sprint goals as defined by the product owner, in addition, the swarming method will demand the team members to work together as a unite team because they understand there is no place for individuals.

Definition(T-Concept):

“…A person with deep vertical skills in a specialized area (such as UX design) as well as broad but not necessarily very deep skills in other relevant areas (such as testing and documentation) …”.

Now to be truly able to implement the swarming method, we should use the T concept, it will allow us to create a balanced team that each individual can contribute to any given task.

Familiarity with the customer

A great scrum team will know the basic facts about their customer (the real customer and not the PO that representing them J), now I know that there are some issues with the idea that the scrum members will gain a direct interface with the customer, but the best scrum teams truly understand what their clients desire and are therefore capable of delivering the exact customer requests without the PO as negotiator.

Know the power of spike solutions  

Definition:

A story or task aimed at answering a question or gathering information, rather than at producing a shippable product.

Sometimes, we will need to add stories that will not contribute to the shippable product that the team should provide at the end of the sprint, in scrum, we have a specific name for this stories called “Spike”, using this type stories the team can perform research and gather any information that will help them to handle and resolve difficult technical challenges.

Trusts each other

Simple, you cannot achieve greatness if your team members are not trusting each other, there is no way to handle a large complex project without a basic trust among the scrum team members, I know that it seems obvious but believe me that I saw just too many projects that fail because of this simple fact.

There is no need in Retrospective meeting

Hold it! Don’t start to think that I’m wrong, just think about it for a second, a true great scum team does not need a dedicated meeting to think about how they can improve in next sprints, the ability of the team to improve the process at any given time is by far a superior approach than one 30 minutes meeting at the end of the sprint.

There is no need in Daily meetings

Daily meetings are used to increase the synchronization among the scrum members, but wait, if the team as all other artifacts of great communication, collaboration and the self-improvement approach, do they really need this meetings? The answer is NO! the synchronization is performed during the entire process and not related to a 15 minutes’ meetings at the start of the day.

Continues delivery against mandatory sprints


In scrum we should deliver a working software once the sprint is done, this is one of the basic criteria of the scrum methodology, now the thing that separate the great scrum teams from all others, is the ability to deliver features continuously once it’s done and therefore there is no need to divide the project into sprints that most teams are using to monitor the team deliverables. 

Tuesday, May 23, 2017

Scrum Team Roles & Responsibilities | David Tzemach

The scrum team in scrum process is a collection of individuals with cross-functional capabilities (Developers, Testers, Designers Etc.) working as a single unit to deliver the work they collectively committed to accomplishing within an iteration.

The effectiveness of a scrum team is determining by their capability to work together as a special unit (Think about an elite army unit) that follows a common goal and vision determined by the product owner, this factors are critical for any methodology but particularly in scrum process that embraces collaboration and respect among the team individuals.

תוצאת תמונה עבור ‪Scrum Team ‬‏


What should be the size of the scrum team?

Scrum teams are like any other special army unit combined with 5 to 9 resources. If there is a project that needs more resources to handle the job effort, we will add more scrum teams that coordinate together to achieve the project goals.


Characteristics of a scrum team 

These are the list of characteristics that we want to have in scrum teams: 
  • Each individual associated with the scrum team should work full time with the team.
  • The knowledge and technical skills within the scrum team are balanced.
  • Team members should follow the same rules, norms, and guidelines.
  • Motivated people that embrace the upcoming challenges.
  • Resource shouldn’t be assigned to other teams).
  • Shares experience with other team members.
  • The scrum team is self-organized.
  • Although the scrum team is built from a set of individuals, they should love to work one with each other.
  • Although the team is built from a set of individuals, they should be committed to the project vision. 


The responsibilities of the scrum team

The scrum team is responsible for the practical side of the project because they will the story collection that the project he's based on, but in addition to this, the scrum team has a few more responsibilities which have to be fulfilled:
  • They must make sure that they update their daily progress in the scrum board.
  • They must validate that they deliver the shippable units they committed on them at the start of the sprint.
  • They should add real action items in the retrospective meeting that will enforce the most important rule in scrum of continues improvement. 
  • They should report for any problems they have during the sprint, so the scrum master can resolve it. 
  • They should make a real time estimation regarding the work effort they should perform in a sprint.
  • They must attend and participate in all scrum meetings (Daily, review, retrospective Etc.).

Sunday, May 21, 2017

The fundamentals of effective bug reporting | David Tzemach

Overview

There is no dispute about the importance of writing an effective bug report, it's the main key to the success of any Defect life cycle (DLC). Effective bug reports should base on a few basic fundamentals that I will cover during this article.

תוצאת תמונה עבור ‪bug reporting‬‏

Why effective bug reports are so important in the Defect life cycle? I know that you already know the answer, if not, just review this list: 

  • Effective bug reports will increase communication among team members.
  • Effective bug reports will increase the chances that the bug gets fixed.
  • Effective bug reports will reduce the programmer investigation time.
  • Effective bug reports will validate that the bug contains all the necessary information that will help during the fixing and verification process.

Bug reporting general guidelines

There are some basic guidelines that we must follow to make the bug report efficient as possible:
  • Isolate the bug, make sure that you identify exactly what the problem is (Root Cause).
  • Keep it simple and do not exaggerate, you are not writing an article or crime report.
  • Make sure that the bug report describes one specific bug (One bug = one report).
  • Prior to opening the bug, validate that the bug does not already exist in the system.
  • Make sure that you use technical facts and not personal opinions.
  • Do not use any abusive language, remember that both you and the developer has the same goal.

Bug reporting Mandatory fields

Bug Title

Once the bug is opened, the title becomes the first thing that other engineers will see, as a result, the bug title should be meaningful, descriptive and unique (usually built from 40-60 characters) in a way that will allow them to understand what the bug is without the need to read the full bug description. 

Bug Description

The bug description is the area that should extend the information about the bug based on the bug title including many artifacts such as:
  • How this bug will affect the system.
  • Expected Vs Actual results.
  • The environment variables
  • Description of the bug.
  • Reproduction scenario.

There are a few simple guidelines that we can use to validate that the bug description is suitable for the exactable quality standards:

  • Make sure that the description reflects the true and entire picture.
  • Describe the bug without any exaggeration.
  • Don’t use an inappropriate language.
  • Don’t add irrelevant information.
  • Use simple and clear language.

Reproduction scenario

A bug incident must include clear instructions on how to reproduce the problem so that others can reproduce it without the need to ask numerous questions. 

A good incident report will include a detailed information about the different phases that the programmer can follow to reproduce the bug, each step should include the relevant details and nothing more, remember that we do not need to write stories, just the MIN necessary information that will help others to reproduce the bug.

So how can you write a good reproduction scenario?

        1.    The reproduction flow must be clear.
        2.    The reproduction flow must be informative.
        3.    The reproduction flow must trigger the bug.
        4.    The reproduction flow, should not include irrelevant steps.
        5.    The reproduction flow must be tested prior to adding it.
        6.    The reproduction flow must include a prerequisite list (Test Environment, Testing data...).
        7.    Determine the reproduction availability
a.       Can you reproduce this defect?
b.       How much time does it take to reproduce this bug?
c.       Is this bug reproduced on the specific lab?
d.       Is this bug reproduced on different environments?
e.       Is this bug existing on older versions?

 

Details about the version and build

The bug report should include the name of the project, iteration and the exact build number that the bug was found on.

Environment Details

In this section, we should add some background information about the test environment used when the bug was found, the minimum information should include information about the Device type, operating system, platform and the setup configuration

Bug Severity

The severity of the bug will help to determine how severely the bug is in terms of damaging and affecting the system. For more information about bug "Severity" please read my previous article:

Bug priority

Determined by the team/project manager, and therefore I will exclude it from my review, but if you need more information you can use this link:

The Expected results

Remember, when you report a bug you describe an error or deviation from the system predefined requirements, in this section you need to describe the accurate way that the application should work.
In addition, we must add the expected results based on documentation and NOT by your personal opinion, otherwise, the developer will follow your opinion and fix the bug against the actual requirements.

The Actual results

In this section, we will describe the actual results that we got based on the reproduction scenario/or on any case that we want to report although we don’t actually know the exact steps that cause it. 


Saturday, May 20, 2017

How to use explicit wait in selenium webdriver | David Tzemach

תוצאת תמונה עבור ‪selenium webdriver explicit wait‬‏

In addition to the basic method of "Implicit" wait, selenium WebDriver also provides a more advanced method to handle synchronization issues that may rise during the tests execution, this method called "Explicit wait".

The major benefits of using the explicit wait:
  1. We can implement it against specific elements and other cases (Implicit wait is relevant to all elements in the DOM).
  2. We can write a specific condition to be enforced prior proceeding of the test execution.
  3. Not like the implicit wait, the explicit wait is not relevant to the entire Driver life cycle.
To define an explicit wait, selenium WebDriver provides two classes:


The WebDriverWait Class

This class provides the basic instruction to the driver, including notifications, polling intervals and how to handle exceptions during code execution. 

Type
Class Member
Description
Property
Message
Operation Type: Get/Set
Define the message to be displayed when time expires (We can use it also for determining the notification syntax).
Property
PollingInterval
Operation Type: Get/Set
Determine how often the condition is evaluated against the element (Default value is 500 milliseconds)
Property
Timeout
Operation Type: Get/Set
Determine the time to wait for a condition to return result (Default value is 500 milliseconds)
Method
IgnoreExceptionsTypes()
This method will allow us to ignore a specific type of exceptions returned from a condition.
Method
ThrowTimeoutException()
Throw a WebDriverException with the specified message


























The Expected Condition Class

This class provides a set of common conditions that we can use in addition to the WebDriverWait command, this condition will tell the driver to wait prior proceeding with the test execution.

Here are the major class members (Feel free to explore the remaining once):
Class Member
Description
ElementExists ()
Validate that a given element is available in a DOM a page.
ElementIsVisible ()
Validate that a given element is available and visible on the DOM a page
ElementToBeClickable (IWebElement)
Validate that a given element is available and visible on the DOM so the user can click on it.
ElementToBeSelectable (IWebElement)
Validate if a given element is selected or not
FrameToBeAvailableAndSwitchToIt (By)
Validate whether a specific frame is available to switch to, if 'true', then the driver will move to the specified frame
InvisibilityOfElementWithText ()
Used to validate that an element with text is invisible/not present on the DOM
PresenceOfAllElementsLocatedBy ()
Used to Validate that all elements that matched to a specific locator are available on the web page
TextToBePresentInElementValue (By, String)
Used to validate if a given text is present in an element attribute value
TitleContains ()
Validate that the title of the page contains a specific string
Titles ()
Validate the title of the page
UrlContains ()
Validate that the page URL against a predefined string


Practical Examples of Explicit wait

In the following code snippet, I will use the ExpectedCondition Class to implement different examples of explicit waits (using the WebDriverWait Class):


Preparations

[TestMethod]
public void ExplicitWait()
{
//Creating a new WebDriver instance
IWebDriver Firefox = new FirefoxDriver();

//Navigate to a web page
Firefox.Navigate().GoToUrl("http://www.machtested.com");

//Create instance of the WebDriverWait Class
WebDriverWait driverwaitinstance = new WebDriverWait(Firefox, TimeSpan.FromSeconds(20));

Using the "TitleContains" condition

The following code will validate that the Web Page title contains a specific syntax.

driverwaitinstance.Until(ExpectedConditions.TitleContains("David Tzemach's Blog"));

Using the "URLContains" condition

The following code will validate that the Page URL contains a specific syntax.

driverwaitinstance.Until(ExpectedConditions.UrlContains("http://www.machtested.com/"));


Using the "TextToBePresentInElement" method

The following code will validate that a specific element contains a specific text that we can define as a condition.

IWebElement textvalidation = Firefox.FindElement(By.XPath("//a[contains(text(),'Quality Assurance')]"));
driverwaitinstance.Until(ExpectedConditions.TextToBePresentInElement(textvalidation,"Quality Assurance"));
}


Using the ElementExists method

In this code snippet, we will use the ElementExists method to validate if a specific element is available in the DOM.

driverwaitinstance.Until(ExpectedConditions.ElementExists(By.XPath("//a[contains(text(),'Quality Assurance')]")));

Using the isElementPresent method

The following code will check for the element presence in the DOM of a page or not. Just remember that although the method can return 'True' (Element is present in the DOM), that does not guarantee that the element is visible, therefore we will use this method when we don't care about the element visibility.

driverwaitinstance.Until(ExpectedConditions.PresenceOfAllElementsLocatedBy(By.XPath("//a[contains(text(),'Quality Assurance')]")));


Using the isElementVisible method

The following code is used for checking that a specific element is both present and visible (With and Height > 0) in DOM.

The First option is to check the visibility of a single element:

driverwaitinstance.Until(ExpectedConditions.ElementIsVisible(By.XPath("//a[contains(text(),'Qualit
y Assurance')]")));

The second option is to check the visibility of multiple elements:

The return value of this method is an IWebElement list of the visible elements

IList<IWebElement> ListOfElements = driverwaitinstance.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.XPath("//option")));


Using the isElementClickable method

The following code is used for checking that a specific element is both Visible and Enabled.

driverwaitinstance.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//a[contains(text(),'Quality Assurance')]")));


Using the InvisibilityOfElementLocated method

We can use this method to validate the invisibility of an element in DOM, the return type is bool (True if the element is not displayed, false if visible).

if (driverwaitinstance.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id("epic-nav-item-heading"))) == true)
{//Perform Task A}
else
{//Perform Task B}


Using the InvisibilityOfElementWithText method

Another option that we can use to validate the invisibility of an element in DOM is using the InvisibilityOfElementWithText, the return type is bool (True if the element is not displayed, false if visible).

if (driverwaitinstance.Until(ExpectedConditions.InvisibilityOfElementWithText(By.ClassName("epic-nav-item-heading"), "Home")) == true)
{//Perform Task A}
else
{//Perform Task B}

My Presentations