Skip to content
Snippets Groups Projects
Commit d2894081 authored by srosse's avatar srosse
Browse files

OO-2036: take screenshot to debug redirection issue in selenium test

parent 29d77a20
No related branches found
No related tags found
No related merge requests found
......@@ -262,8 +262,9 @@ public class AuthenticatedDispatcher implements Dispatcher {
ws.disposeClosedWindows(ureq);
Window window = ws.getWindow(ureq);
if (window == null) {
//probably a
if(usess.isSavedSession() && !usess.getHistoryStack().isEmpty()) {
if(request.getPathInfo() != null && request.getPathInfo().contains("close-window")) {
DispatcherModule.setNotContent(request.getPathInfo(), response);
} else if(usess.isSavedSession() && !usess.getHistoryStack().isEmpty()) {
redirectToDefaultDispatcher(request, response);
} else {
DispatcherModule.sendNotFound(request.getRequestURI(), response);
......
......@@ -46,7 +46,12 @@ public class UserProfilePage {
*/
public UserProfilePage assertOnProfile() {
By profileSegmentBy = By.cssSelector("div.o_segments a.btn.o_sel_usersettings_profile");
OOGraphene.waitElement(profileSegmentBy, 5, browser);
try {
OOGraphene.waitElement(profileSegmentBy, browser);
} catch (Exception e) {
OOGraphene.takeScreenshot("Assertonprofile", browser);
throw e;
}
WebElement profileSegmentEl = browser.findElement(profileSegmentBy);
Assert.assertTrue(profileSegmentEl.isDisplayed());
return this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment