Strange behavior when changing URL in Safari
Posted: Sat Sep 14, 2019 1:52 am
I am experiencing some strange behavior when changing URLs in Safari. In our app, clicking on our main logo image re-directs to the main applet by changing the url ( window.location.href = '#'). When automating this with Siesta in Safari, clicking the logo leads to the iframe containing the app to re-direct to the Siesta browser interface instead of the main page. We are using Siesta 5.2.3.
I wrote a workaround to detect the browser we're using and to replace logo clicks with another url re-direct if we're in Safari. This works for now but it would be nice if clicking the logo in Safari did not produce this behavior.
I have included a gif and a reproducible example to produce the issue.
In Chrome - as expected
In Safari
Project
spike.html
Test Case
I wrote a workaround to detect the browser we're using and to replace logo clicks with another url re-direct if we're in Safari. This works for now but it would be nice if clicking the logo in Safari did not produce this behavior.
I have included a gif and a reproducible example to produce the issue.
In Chrome - as expected
In Safari
Project
const project = new Siesta.Project.Browser.ExtJS();
project.configure({
title : 'Test',
});
project.plan({
group : 'Classic Tests',
items : [{
desc : 'Test url redirect',
pageUrl : '/siesta/spike.html',
url : 'classic-tests/system/new-survey/02_spike.js'
}]
});
project.start();
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>
<span id="clickme" onclick="changeURL()">Click me</span>
</h1>
<script>
function changeURL() {
window.location.href = '#';
}
</script>
</body>
</html>
StartTest(t => {
t.describe('Test clicking and re-directing to #', t => {
t.chain({
waitFor : 2000
},{
click : '#clickme'
});
});
});