2

I am intending to automate the charts displayed in qlikview pages with selenium.As such charts are accessed as image as a whole in these pages its getting difficult to interact & locate specific elements/text on these charts.

Qlikview Demo link:- http://ap.demo.qlik.com/QvAJAXZfc/opendoc.htm?document=qvdocs%2FRetail%20Omni-Channel%20Analytics.qvw&host=Demo11&anonymous=true

Code to hover mouse over the chart:-

Point coordinates = driver.findElement(By.xpath("//div[@id='68']/div[2]/div[2]/img")).getLocation();
Robot robot = new Robot();
robot.mouseMove(coordinates.getX(),coordinates.getY());
Thread.sleep(5000);

Code to capture tooltip value:-

String Tooltip = driver.findElement(By.xpath("//div[@class = 'QvHover']/span[2]")).getText();
System.out.println("Tooltip value:- "+Tooltip);

Though I figured out a way to capture its tooltip value but other than this I'm unable to find ways to locate/capture other elements such as lables on the axis for line chart,legends,etc

Any help would be appriciated

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Shoaib Shaikh
  • 343
  • 7
  • 22

1 Answers1

1

Below is Qlickview Data validation code used under selenium using Java

Step 1. Locate the qlikview frame.

driver.switchTo().frame(driver.findElement(By.className("report_iframe_test")));

Step 2. Go to html element present under qlikview frame which is displayed after inspecting element using the IE developer tool

driver.findElement(By.id("PageContainer_test"));
driver.findElement(By.id("MainContainer_test"));

after locating the element present on qlikview, ex. from highlights section

String id = driver.findElement(By.id("32_test")).getText();
System.out.println("after frame--"+id);

sysout will print report element value which we can compare against database so as to do data validation.

Malt
  • 28,965
  • 9
  • 65
  • 105
Sagar
  • 26
  • 1