lundi 5 octobre 2015

selenium webdriver how to use object tag?

I need to click on a pdf file in the browser and the verify the contents in that, By using below code am able to click on the pdf link but i can't verift the contents inside that pdf link ,the pdf is embedded in object. How can we locate an element inside object tag and perform some actions on pdf file(html type).

To click on pdf link.. WebElement element = driver.findElement(By.xpath("//div[@id='iconDock']/div/a[7]/img")); element.click();

This code to verify content in pdf(its not working).

WebElement objectTag = driver.findElement(By.xpath("//div[string(@id)='reportPanel']//object/html/body//div[@id=\"outerContainer\"]/div[@id=\"viewer\"]/div[@class=\"textLayer\"])"));

Help me out please

Aucun commentaire:

Enregistrer un commentaire