i am using selenium page object model below is the problem scenario i am clicking on an element using below command
driver.findElement(By.xpath("xxxxxxxx")).click();
when code execute the above line , click has been performed in the browser and a new page starts loading but code stuck at the above line untill the whole page loads. i am not able to perform any operation on any webelemnet untill the page loads completely. below is the code:
WebElement element = driver.findElement(By.xpath(".//*[@id='lll-menu-1']/div[1]/ul/li[4]/a"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);after this line code stuck here until the page loads completely
WebElement elem = driver.findElement(By.xpath(".//img[@alt='Cool Racerback - regular']"));
elem.click();