Export as HTML (plus autorun)

I have a macro that runs correctly in Kantu. Once I 'Export as HTML (plus autorun) it gets stuck on the last step and get the error below.

timeout reached when looking for element ‘//*[@id="highcharts-4"]/div/div/div[4]’

It is then unable to run in Kantu after that as well. I can delete and recreate and it will run fine. The Source View (JSON) looks exactly the same so I am not sure what is causing the problem. My macro sets a filter in Highcharts and then ‘Downloads Data’ from a ‘Chart context menu’. I have mostly been working with the Chrome extension and I recently tried with Firefox and I still have the same error.

Here is the JSON Code.

{
“CreationDate”: “2018-7-19”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.eia.gov/petroleum/production/#oil-tab”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//[@id="petroleum_table"]/tbody/tr[1]/td[1]/span",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "//
[@id="highcharts-4"]/div/div/div[4]”,
“Value”: “”
}
]
}

Does the test macro still work for you? I get

[error]
timeout reached when looking for element ‘//[@id=“petroleum_table”]/tbody/tr[1]/td[1]/span’

during a test run. What elements do you want to click? (maybe a screenshot will help)

Sure thanks for replying. I uncheck the US box before I start recording the Macro. The first step is to select ‘US’ (1). I then go to Chart context menu > Download Data (2). The macro works in Kantu but it fails when I export it to HTML. After I export to HTML it will no longer work in Kantu like before.

Nice quest =)
I thought it would be easier.
I see the problem: the link appears only when you click on icon. Before that link doesn’t even exist on page.

In old selenium i would try mouseOver* and mouseDown* command, but here it is only mouseOver available and it doesn’t work.
(To be honest, i tried in old SeIDE 2.9.1 and it works worth here - i couldn’t click anywhere at all.)

I tried visual assert and to click on #efp. That works only when i manually scroll icon into visual area =)
Otherwise it clicks on a menu bar. So the scroll to top makes a bad trick with visuals here.
My testcase:

Try as Visual

{
“CreationDate”: “2018-7-20”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.eia.gov/petroleum/production/#oil-tab”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//[contains(@id, "petroleum_table")]/tbody/tr[2]/td[1]/span",
“Value”: “”
},
{
“Command”: “visionLimitSearchArea”,
“Target”: “full”,
“Value”: “”
},
{
“Command”: “visualAssert”,
“Target”: “NwYTPo_dpi_96.png”,
“Value”: “yes”
},
{
“Command”: “mouseOver”,
“Target”: “#efp”,
“Value”: “”
},
{
“Command”: “clickAt”,
“Target”: “#efp”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "//
[@id="highcharts-4"]/div/div/div[3]”,
“Value”: “”
}
]
}
This text will be hidden

Picture for testcase: nwytpo_dpi_96

So i am also interested in solution of this question, as it is just very tricky =)

Hello, team (@TechSupport ) and TS (@jrix ) .
What was the solution here?
I have some kind of similar situation now, and need some hints how to scroll element into view.
Thanks in forward.

@Dukuu Hi, can make a new ticket with your issue? Scroll into view should work by default with command like click or type.

Yep, that’s a good idea, i also found it as a solution - just to click on block background to center the element.
It solves the problem actually, thanks.