0 votes
in Selenium by
What is the same-origin policy and how is it handled?

1 Answer

0 votes
by

Same Origin policy is a feature adopted for security purposes. According to this policy, a web browser allows scripts from one webpage to access the contents of another webpage provided both the pages have the same origin. The origin refers to a combination of the URL scheme, hostname, and port number.

The same Origin Policy prevents a malicious script on one page to access sensitive data on another webpage. 

same-origin

Consider a JavaScript program used by google.com. This test application can access all Google domain pages like google.com/login, google.com/mail, etc. However, it cannot access pages from other domains like yahoo.com 

Selenium RC was introduced to address this. The server acts as a client configured HTTP proxy and "tricks" the browser into believing that Selenium Core and the web application being tested come from the same origin.

Related questions

0 votes
asked Aug 22, 2019 in Selenium by john ganales
0 votes
asked Aug 22, 2019 in Selenium by john ganales
...