How to skip a method or a code block in TestNG

0 votes
Can i get a simple logic on the above question?
Feb 8, 2019 in Selenium by Neha
• 6,300 points
4,333 views

1 answer to this question.

0 votes

If you want to skip a particular test method, then you can set the ‘enabled’ parameter in test annotation to false.
@Test(enabled = false)

By default, the value of ‘enabled’ parameter will be true. Hence it is not necessary to define the annotation as true while defining it.

answered Feb 8, 2019 by Frankie
• 9,830 points

Related Questions In Selenium

0 votes
1 answer

How can I skip a @Test method from execution in TestNG?

Hey Darsh, you can skip a @Test ...READ MORE

answered Jun 20, 2019 in Selenium by Abha
• 28,140 points
2,373 views
0 votes
1 answer
0 votes
1 answer

How to disable a test case in testNG?

You can use the enable method to ...READ MORE

answered Jan 3, 2019 in Selenium by Nabarupa
2,175 views
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,763 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,184 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,258 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,895 views
0 votes
1 answer
0 votes
1 answer

How to send ALT/SHIFT/CONTROL key in Selenium WebDriver?

When we generally use ALT/SHIFT/CONTROL keys, we ...READ MORE

answered Feb 8, 2019 in Selenium by Frankie
• 9,830 points
15,858 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP