Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

phantom doesn't load content of page as chromedriver (page has flash) #12784

Closed
arisAlexis opened this issue Nov 30, 2014 · 3 comments
Closed
Labels

Comments

@arisAlexis
Copy link

I have a problem running selenium tests with phantomjs from Java. I am aware that phantomjs doesn't support flash. I am running dual tests with chromedriver without flash enabled and phantom. on a page that chromedriver displays no flash plugin enabled, it just loads the rest of the page and reads it correctly. The phantom tests throw an exception of timeout to an element but thats normal because the screenshot shows that the page doesn't load.

The code to reproduce the problem follows:

public void test() throws InterruptedException {
//System.setProperty("webdriver.chrome.driver", Application.chromeDriverPath);
//WebDriver driver= new ChromeDriver();
WebDriver driver=new PhantomJSDriver();
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
driver.manage().window().setSize(new Dimension(1280, 800));

driver.get("http://www.betfred.com/sport");

WebElement footballLink=driver.findElement(By.linkText("Football"));
footballLink.click();

WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement europeanLink= wait.until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText("European Leagues")));
europeanLink.click();

    wait = new WebDriverWait(driver, 10);
    WebElement leagueLink= wait.until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText("Swiss Super League")));
    leagueLink.click();

    wait = new WebDriverWait(driver, 10);
    WebElement finalLeagueLink=wait.until(ExpectedConditions.elementToBeClickable((By.xpath("//a[contains(text(),'Swiss Super League') and contains(@class,'action')]"))));
    Thread.sleep(1000);
    finalLeagueLink.click();

driver.switchTo().frame("sportframe");

wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//span[contains(text(),'Swiss Super League')]")));

}

test passes with chromedriver

@williamjablonski
Copy link

Phantom Driver doesn't have support for Flash technology. This doing only Java Script .

@arisAlexis
Copy link
Author

the page has a flash object but the target html I want to get is not in this object. I guess it is blocking the rendering.

@stale stale bot added the stale label Dec 26, 2019
@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants