Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Page Objects and testcases in Test cases Problem cSharp

View previous topic View next topic Go down

Page Objects and testcases in Test cases Problem cSharp

Post by l3l00 on Tue Jan 06, 2015 2:23 am

So, I have setup a class that contains the setup & teardown attributes called Gears.
I have a class that holds the pageObjects and Gears is extended on it and a class for the testcases - Gears also extended on it as well.

So I will have a test case like:

Test
public void test_pageObjectISSue() {
payments_targetPoints pageObject = new payments_targetPoints();

driver.Navigate().GoToUrl("someURL");
driver.Navigate().GoToUrl("someURL");

pageObject.testEcho();
}

Another:

Test
public void test_shouldwork() {
payments_targetPoints pageObject = new payments_targetPoints();


test_pageObjectISSue();

pageObject.testEcho();

}


public void testEcho()
{
Utilities genUtilz = new Utilities();

this.driver = driver;
try
{
Console.Write("\n" + "This is just a simple test");
driver.Navigate().GoToUrl("someURL");
genUtilz.WaitForTesto("tag", "body", 10, driver);

}
catch {
Console.Write("\n" + "could not print");
driver.Quit();

}

}



The second test case calls the first one, what I have been noticing on my other test cases, I would get the pageObject I would call to fail? This one I get an Object Reference no initiated, however on others, it will run through just fine but the pageObject try & catch will catch everytime. I do not know what I am doing wrong?

l3l00
Active particpant
Active particpant

Posts : 11
Join date : 2015-01-06

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum