Difficulties in using the elementFromPoint command through phantomJS to simulate the click on an element within a google maps

0

I'm trying to use PhantomJS, I can simulate the effect of the function of the element that is on the page in the top bar with the text "monitoring point", but with the same command I can not get the name or perform a "click" inside the balls that are inside the map.

Has anyone done this yet? I need to get data from a table that is generated after clicking on any of the polka dots, so really I should simulate a click.

    
    var page = require('webpage').create();
 
var system = require("system");

var stepIndex = 0;


 page.viewportSize = {width: 1366, height: 654};


 var name;
 
 
 
var steps = [ 
 function(){ 
page.open("http://sace.cprm.gov.br/muriae/", function (status) {

});
 },
 
 


function (){
	page.evaluate(function (){
	
//coodenada da bolinha que eu quero porciuncula 680,318
		document.elementFromPoint(506,012).value="5";
		
		document.elementFromPoint(506,012).onchange();
		
	
		
	});
},
	 
function(){	 
    
	page.render("result.png");
}
];




setInterval(function(){
	if(typeof steps[stepIndex]=="function"){
		console.log("etapa "+(stepIndex+1));
		steps[stepIndex]();
	stepIndex++;}
	if(typeof steps[stepIndex]!="function"){
		phantom.exit();
	}
	
	
},3333);
    
asked by anonymous 06.03.2018 / 19:01

0 answers