Issues with browser actions in debug mode

Answered

Good morning, hope everyone had a good christmas.

I’m currently having an issue whilst working my way through Class 11 of the ToolsQA Course (introduction to Frameworks). So that I can form a proper understanding, I have written out the code myself and am debugging through it so I’m clear what is going on.

I’ve created a TestRunner, as below, so that I can iterate through each test in the array list


List<iTest> tests = new ArrayList<iTest>();
// adding first test

tests.add((iTest) new DragDefaultTest001());
// adding second test

tests.add((iTest) new ColorCheckTest002());
BREAKPOINT HERE!!

for(int i = 0; i < tests.size() ; i++)

{

iTest currentTest = tests.get(i);

currentTest.testSetup(driver);

boolean testResult = currentTest.runTest();

if(testResult)

{

System.out.println(currentTest.testName() + " test passed.");

}

else

{

System.out.println(currentTest.testName() + " test failed.");

}

currentTest.testCleanup();

}

I’ve set a breakpoint at the line of code highlighted above. The issue I have is that when I go into debug mode and start stepping into the code, whilst the firefox browser loads up, it is just a blank browser window., and not the desired website.  Also, in the debug window, I get the below message:
Issues with browser actions in debug mode

Am I not able to see the actions carried out on a browser in real-time in debug mode? The reason I ask, is that when i run the test outside of debug mode the desired website page loads up and the test completes.

Any help would be appreciated here, thanks

Andy

UPDATE 30/12/14
Below is a screenshot showing a further example of this. I get an error advising the source could not be found for Joiner$MapJoiner.appendTo(StringBuilder, Map<?,?>)line 322…but this is one of many that I get! When it asks me to edit the source lookup path, where am I looking?
Issues with browser actions in debug mode

tilston1001 Train Asked on December 30, 2014 in Selenium WebDriver.
Add Comment
1 Answer(s)
Best answer

Hi Andrew,

There are two things here
1. The part of the code that  you are trying to access are external libraries. You just have the libraries and you dont have the source code. You have two options.  Either dont step into code parts which are not your, or get the source jars also for that library and add it to build path.  I would suggest that going into external libraries isnt that useful unless you know that its a bug in the external library. Just use step over instead of step into.
2. The second question that you dont see any page loaded on the browser. It depends one whether you have run a get command on your browser before you reach to the break point. You may want to share more code, the part above adding the tests.

Do let me know in case you have more questions

Thanks
Virender

Virender Singh Professor Answered on December 31, 2014.

Hi Virender, that’s great thank you. I have just stepped over the code that references these external libraries as I haven’t touched these. Doing this resolved the problem.

Many thanks, and happy new year!

on December 31, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.