Compare 2 sites

by (82 points)
+1 vote

Can you tell me please how can I compare 2 sites ? 





Lineups, Table, Head To Head 

This not work fine for me :(


 public static string GetInnerHtml(IWebElement element)
            IJavaScriptExecutor executor = ((IJavaScriptExecutor)ObjectRepository.Driver);
            var remoteWebDriver = (RemoteWebElement)element;
            var javaScriptExecutor = (IJavaScriptExecutor)remoteWebDriver.WrappedDriver;
            var innerHtml = javaScriptExecutor.ExecuteScript("return arguments[0].innerHTML;", element).ToString();
            return innerHtml;
       public string GetDataLineups()
            string LineupsHtml = XMLHelper.GetInnerHtml(ObjectRepository.Driver.FindElement(By.XPath("//div[@class='srl-tab srl-tab-widgets-matchlineups selected sr-widget sr-widget-level-0 sr-widgets-matchlineups sr-large']"))).ToString();
            return LineupsHtml.ToString();

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

by (171 points)
0 votes
Instead of comparing InnterHTML, you should try comparing title, menu iteams and other elements manually. Since you are dealing with two different domain names, there are possibilities that generate source may not be the same. Atleast domain name inside your innerHTML will differ.


I would suggest you to compare important elements of the webpage.


Hope that helps.