The title says it all - gets 'access denied' when passing control off to Testrunner.html (the URL to Testrunner is broken, but even when it is fixed it still doesn't work). No idea why (the file exists!).

I am working on this - let me know if you have any ideas!

Comments

Jo Wouters’s picture

( Great module Grugnog2 !
I like it a lot: it makes it much more easy to test in Drupal. )

I think the problem in selenium_launch().

These are the changes I did to get it working with clean URLs off:
* replaced drupal_goto
* the '?q=' has to be urlencoded; otherwise Selenium seems to cut it of at the '='

I suppose there is a better way to create the URLs; but this solution seems to works.

function selenium_launch($source, $nid) {
  global $base_url;
  // Create the url to pass to Selenium
  // Attention: path should be absolute; paths in variabeles should be urlencoded (Selenium drops the '=')
  // Get folder of selenium.module - only keep the foldername
  $url_testrunner = base_path().drupal_get_filename('module', 'selenium').'/../selenium/TestRunner.html';
  $url_auto = '?auto=true';
  $url_test = '&test='.urlencode(base_path().'?q=selenium/'.$source.'/'.$nid.'/suite');
  $url_baseURL = '&baseURL='.$base_url.base_path();
  $url_resultsUrl = '&resultsUrl='.urlencode(base_path().'?q=selenium/results/'.$nid);
  $url = $url_testrunner.$url_auto.$url_test.$url_baseURL.$url_resultsUrl;
  header('Location: '. $url);
  exit();
}
owen barton’s picture

Thanks Ballie!

I'll check this out as soon as I get a chance (need to test the change with clean URLs both on and off) and fix the code.

Jo Wouters’s picture

I think the use of clean urls does not exclude the possibility to adress an url the 'old fashoined' (not clean) way. So if it works with clean urls off, then it should work with clean urls on too, I suppose ?

resultsUrl does not seem to work in my code. And I do not understand how I can solve this (worse: I even don't seem to understand what's going wrong).

owen barton’s picture

Status: Active » Fixed

This should now be fixed in the newest (well - not that new really!) 4.7 branch.

Anonymous’s picture

Status: Fixed » Closed (fixed)