Tag Info

Hot answers tagged

5

My first advice is to not write automated tests for pages that change frequently. You may be better off testing those pages manually. If you insist on automation, think about which aspects of the pages do not change, and write classes to model those aspects. For example, if forms always consist of text fields and a submit button, you can write a class to ...


3

I actually wrote that library while I was at a company creating automation for them. I had plans to open source it, but unfortunately never was able to and have since moved to a different company. In the presentation I was using the library I created, however you can build your own abstraction layer that does many of the things I talked about as well, or ...


1

Your question hints at a couple of questions: What Is a Page Object? A page object is code written to model an actual page (or part of a page) in a web application. Eg. each page in your app, would have an associated page object file that provides the “services” that the actual page offers. Eg. if there’s a button on a page in your application, you would ...


1

There are three main advantages to putting your functions into PageObjects rather than just having a bunch of static functions: Context. LoginPage.clickNext() vs ItemDetails.clickNext() immediately tells you what page you're on when looking at the test, even if they're identical methods inherited from a parent class. The PageObjectFactory can ...


1

Though there are many advantages of Page Project Model, some of them are : Simple and clear page classes with sensible method names. You can actually give the customize names to you methods. Like above so that you need not to keep anything in mind. Just looking into the method name gives you all idea about the capabilities of the method. Makes tests more ...


1

There are two parts to this. The first is that you need to be sure that your xPath is correct. One way to validate that is to use a tool like Firefinder (a firefox extension for firebug). Navigate to your page and be sure the element you need is present and then hit f12 and go to the FireFinder section. Enter in the xpath you are using and see if it can ...


1

Can you find it if you use the .Text and then clicking it if it matches? String Expectedtext = "Procurement" String ProcurementButtonText = driver.FindElement(By.XPath("//td")).Text; if (ProcurementButtonText == Expectedtext) { driver.FindElement(By.XPath("//td")).click() }



Only top voted, non community-wiki answers of a minimum length are eligible