I am using appium 1.1.0,i am facing an issue with the javascript executor

Hi all

I have custom calender view in my ios application,as I need to select the date I am using the precise tap which work through the java script executor.
script is not being executed.

Is there any issue with the java script executor in appium 1.1.0

Are you within webcontext?
What JS command are you using?
I’d update appium, by the way. A lot of improvement and pretty stable.

hi kirill

i am not in the webcontext.

i have custom calender view in which i need to select the date, so for that i am using the JavaScript executor and the command i am using is ___js.executeScript(“mobile:tap”, tapObject);

example code snippet
JavascriptExecutor js = (JavascriptExecutor) wd;
HashMap<String, Double> tapObject = new HashMap<String, Double>();

    tapObject.put("tapCount",  1.0); 
    tapObject.put("touchCount",  1.0); 
    tapObject.put("duration",  0.5);
    tapObject.put("x",  636.0);
    tapObject.put("y",  432.0);
    js.executeScript("mobile:tap", tapObject);

appium stops executing the js.executeScript(“mobile:tap”, tapObject); line

As I understand your calendar view is pure native? How would you use JS to interact with native layout of the app? executeScript method is for webview.

ok thank you

how can i interact with it? i don’t find any element details there to interact

so for the elements which i am not able to acceess i am using the precise tap using the locations

I guess that’s custom view. I don’t know any way to automate the cells, except by coordinates :confused:
Can you send me page source?


here is the page source for the i just picked only the popover page source
pagesourcedoc.txt (2.6 KB)

hi kirill

please take a look at the attcahed text file

problem is solved by this

driver.tap(arg0, arg1, arg2, arg3);

wd.tap(1, x, y, 1);

thank for your response@kirill