How to write regular expression In testng xml file to search for specific keyword

0 votes
How to write regular expression In testng.xml file to search @Test methods containing specific keyword.
Jun 18, 2019 in Selenium by Joginder
4,206 views
How to can you execute all methods containing *product*[] keyword in Testng. Xml file?
Use should use regular expression for searching for your keyword just like @Anvi has mentioned in her answer. Have you tried it?

1 answer to this question.

0 votes

Hi Joginder, you can write regular expression to find @Test methods containing specific keyword by using following syntax in testing.xm file:

<methods>
     <include name=".*keyword.*"/>
</methods>

answered Jun 19, 2019 by Anvi
• 14,150 points

Related Questions In Selenium

0 votes
1 answer

How to create a executable jar file for TestNG and the runnnig point should be the Xml file

Use Eclipse Export Wizard. While exporting, select "Create ...READ MORE

answered Aug 24, 2018 in Selenium by Meci Matt
• 9,460 points
7,679 views
+2 votes
1 answer
0 votes
1 answer

How to pass parameter through testng.xml file to a test case in Selenium Webdriver?

Hello Revathi, to pass parameter through testng.xml ...READ MORE

answered Jun 12, 2019 in Selenium by Abha
• 28,140 points
7,293 views
0 votes
1 answer
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,513 views
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
12,714 views
0 votes
1 answer

Diff between WebDriver listeners and TestNG listeners?

This is not a very important concept ...READ MORE

answered Apr 14, 2018 in Selenium by king_kenny
• 3,710 points
6,124 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
8,608 views
0 votes
1 answer

How reports can be produced in different ways for TestNG results?

Hey Suraj, TestNG offers two ways to produce ...READ MORE

answered Jun 19, 2019 in Selenium by anonymous
• 14,150 points
1,524 views
0 votes
1 answer
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