All Questions
9 questions
2
votes
1
answer
52
views
Should Page Objects be reused or should new ones be created?
I am fairly new to using POM and I am wondering if there is a best practice when returning to a previously visited page. Is it better to create a new page object every time there is a page navigation? ...
0
votes
1
answer
291
views
java.lang.NullPointerException on my POM project. I have my Page factories initialized and cant figure out the issue [duplicate]
I am getting the following error message in my IntelliJ
The "TestBase.java:33" and "LoginPageTest.java25" essentially both point to the
if(browserName.equals("chrome")) line of code in the base ...
3
votes
1
answer
2k
views
How to resolve NullPointerException error while implementing POM with cucumber framework
I am getting java.lang.NullPointerException while executing my test case, I am using Page Object Modle with cucumber framework in my maven project, following are the code snippets
BoxJunitScript.java
...
3
votes
3
answers
308
views
How to abstract data classes to be more object oriented?
I have run into problems keeping my tests as object-oriented as possible. I have had to rewrite large portions of my code multiple times now, and I feel that there is a better approach to what I'm ...
-1
votes
1
answer
640
views
Getting "java.lang.NullPointerException" exception when i try to run my POM test [duplicate]
I have 2 classes in my project
First class contains all the webelements
Second one for method where i am using this elements
package facebook;
import org.openqa.selenium.By;
import org.openqa....
0
votes
2
answers
442
views
How to locate a link using page object model after mouse over
When I hover over login text there are list of links, i need to select Infostore using Page Object model approach. I am new to Selenium could any one help. I have the outer HTML for you:
<div ...
0
votes
1
answer
884
views
Use Login method before test
I use POM pattern in Selenium tests.
To run tests OpCreate and OpEdit, a user should be logged in.
I have positive test for Login, but how to run Login every time OpCreate and OpEdit tests are run? ...
1
vote
2
answers
9k
views
How to send variable (dynamic value) at @findby in POM using java
How to send variable with dynamic value at @findby in POM using java like -
//div[@class='item']/div[@class='containerbody'][@columnid=' "+i+" ']/div/div[contains(@class,'swimLaneheader')]
where i ...
5
votes
1
answer
795
views
keep test data of json format in pom patterm
Can you please tell me how to write test data in the page object pattern.
Here I am using multiple packages. One is for locators identification, another is for page factory for initializing elements,...