New answers tagged

0

Instead, combine both. I have developed a support package that uses page factory to read locators from JSON. Here is the article. https://medium.com/@hemanthsridhar92/custom-selenium-page-factory-to-read-locators-from-json-48710f77e272 Let me know if you have any questions.


0

You are using the driver object before actually creating its instance. So when you say driver.FindElement(), the driver instance is null, so the execution is throwing a Null Pointer Exception You can move the below lines into your f() method to fix the error. So your f() will look like the below. public void f() { try { driver....


0

You define a class property which tries to initialize with a driver that does not yet exist. So the driver is NULL and you get a NullPointerException. You could move the WebElements to the test method or assign the value after the driver has been set in the beforeMethod construccionMenu = driver.findElement(By.xpath("//li[@data-url='/Construccion_reparacion'...


0

If you don't set priority by default, the method will have a priority of zero. When you have multiple methods with the same priority they will be run in alphabetical order.


0

The best method in my opinion will be to explore Groups in TestNG. You can mark the 500 Test Cases in Regressions as below : @Test(priority=1, groups={"Regression"}) public void testCaseOne() { } In your testNG XML, include Group Tag to Run these testCases. First mark all the Test Cases as per the need and then generate testNG XML by Right-Clicking on ...


0

you can go with BDD-cucumber .cucumber will provide you the custom tags by which you can easily divide your regression suite to multiple groups such as, @regression @sanity @high-level Example suppose i am having 1000 test cases in my regression and i have to do the only high-level testing or sanity check so while writing the feature file you can give ...


0

From the looks of the error: The markup declarations contained or pointed to by the document type declaration must be well-formed. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at ...


0

All the files which are local to the project or test execution like .project should be in gitignore file.


1

EDge does not has a headless browsing version, running automation scripts via Jenkins requires headless browser modes. It will work fine for chrome and firefox. If you want to run scripts on Edge via Jenkins, you might want to use a third-party tool like Browserstack.


0

In .Net ISearchContext.FindElement() throws NoSuchElementException. Based on the official Selenium documentation I speculate that in Java it does not throw exception or WebDriverWait.Until knows how to handle it. WebDriverWait.IgnoreExceptionTypes(typeof(NoSuchElementException)); would help but it does not work. Solved with static helper method: using ...


Top 50 recent answers are included