java - Click is not working with appium test is passing but no action is performed -


i want click on logout button. have tried following things perform click action

using tap

  webelement logout = driver.findelementbyname("log out");             touchaction act = new touchaction(driver);             act.tap(logout, 1, 1); 

simple click

webelement logout = driver.findelementbyname("log out");         logout.click(); 

press

touchaction act = new touchaction(driver);         act.press(logout).perform() 

;

for press giving

an unknown server-side error occurred while processing command. 

also tried

mobileelement logout = (mobileelement) driver.findelementbyname("log out");         logout.tap(1, 10); 

which gives same unknown server-side error

let me know if doing wrong anywhere.

enter image description here

thanks in advance.

here server log

> info: [debug] [bootstrap] [debug] finding log out using name contextid:  multiple: false > info: [debug] [bootstrap] [debug] using: uiselector[description=log out, instance=0] > info: [debug] [bootstrap] [debug] returning result: {"status":0,"value":{"element":"2"}} > info: [debug] responding client success: {"status":0,"value":{"element":"2"},"sessionid":"ad4afb54-6f6d-4a39-bb60-49e4cbbcc4bc"} > info: <-- post /wd/hub/session/ad4afb54-6f6d-4a39-bb60-49e4cbbcc4bc/element 200 44.615 ms - 87 {"status":0,"value":{"element":"2"},"sessionid":"ad4afb54-6f6d-4a39-bb60-49e4cbbcc4bc"} > info: --> post /wd/hub/session/ad4afb54-6f6d-4a39-bb60-49e4cbbcc4bc/touch/perform {"actions":[{"action":"press","options":{"element":"2"}},{"action":"wait","options":{"ms":250}},{"action":"release","options":{}}]} > info: [debug] pushing command appium work queue: ["element:getlocation",{"elementid":"2"}] > info: [debug] pushing command appium work queue: ["element:getsize",{"elementid":"2"}] > info: [debug] [bootstrap] [debug] got data client: {"cmd":"action","action":"element:getlocation","params":{"elementid":"2"}} > info: [debug] [bootstrap] [debug] got command of type action > info: [debug] [bootstrap] [debug] got command action: getlocation > info: [debug] [bootstrap] [debug] returning result: {"status":0,"value":{"x":-256,"y":932}} > info: [debug] [bootstrap] [debug] got data client: {"cmd":"action","action":"element:getsize","params":{"elementid":"2"}} > info: [debug] [bootstrap] [debug] got command of type action > info: [debug] [bootstrap] [debug] got command action: getsize > info: [debug] [bootstrap] [debug] returning result: {"status":0,"value":{"width":240,"height":81}} > info: [debug] pushing command appium work queue: ["element:getlocation",{"elementid":"2"}] > info: [debug] [bootstrap] [debug] got data client: {"cmd":"action","action":"element:getlocation","params":{"elementid":"2"}} > info: [debug] [bootstrap] [debug] got command of type action > info: [debug] [bootstrap] [debug] got command action: getlocation > info: [debug] [bootstrap] [debug] returning result: {"status":0,"value":{"x":-256,"y":932}} > info: [debug] pushing command appium work queue: ["element:getsize",{"elementid":"2"}] > info: [debug] [bootstrap] [debug] got data client: {"cmd":"action","action":"element:getsize","params":{"elementid":"2"}} > info: [debug] [bootstrap] [debug] got command of type action > info: [debug] [bootstrap] [debug] got command action: getsize > info: [debug] [bootstrap] [debug] returning result: {"status":0,"value":{"width":240,"height":81}} > info: [debug] pushing command appium work queue: ["element:touchdown",{"elementid":"2","x":-136,"y":972.5}] > info: [debug] [bootstrap] [debug] got data client: {"cmd":"action","action":"element:touchdown","params":{"elementid":"2","x":-136,"y":972.5}} > info: [debug] [bootstrap] [debug] got command of type action > info: [debug] [bootstrap] [debug] got command action: touchdown > info: [debug] [bootstrap] [debug] performing touchdown using element? true x: -136, y: 972 > info: [debug] [bootstrap] [debug] returning result: {"status":13,"value":"failed execute touch event"} > info: [debug] responding client error: {"status":13,"value":{"message":"an unknown server-side error occurred while processing command.","origvalue":"failed execute touch event"},"sessionid":"ad4afb54-6f6d-4a39-bb60-49e4cbbcc4bc"} > info: <-- post /wd/hub/session/ad4afb54-6f6d-4a39-bb60-49e4cbbcc4bc/touch/perform 500 211.167 ms - 198  > info: [debug] didn't new command in 60 secs, shutting down... > info: shutting down appium session > info: [debug] pressing home button > info: [debug] executing cmd: c:\users\fission\appdata\local\android\android-sdk\platform-tools\adb.exe -s f547bbb6 shell "input keyevent 3" > info: [debug] stopping logcat capture > info: [debug] logcat terminated code null, signal sigterm > info: [debug] [bootstrap] [debug] got data client: {"cmd":"shutdown"} > info: [debug] [bootstrap] [debug] got command of type shutdown > info: [debug] [bootstrap] [debug] returning result: {"status":0,"value":"ok, shutting down"} > info: [debug] [bootstrap] [debug] closed client connection > info: [debug] sent shutdown command, waiting uiautomator stop... > info: [debug] [uiautomator stdout] instrumentation_status: numtests=1 > info: [debug] [uiautomator stdout] instrumentation_status: stream=. > info: [debug] [uiautomator stdout] instrumentation_status: id=uiautomatortestrunner > info: [debug] [uiautomator stdout] instrumentation_status: test=testrunserver > info: [debug] [uiautomator stdout] instrumentation_status: class=io.appium.android.bootstrap.bootstrap > info: [debug] [uiautomator stdout] instrumentation_status: current=1 > info: [debug] [uiautomator stdout] instrumentation_status_code: 0 > info: [debug] [uiautomator stdout] instrumentation_status: stream= > info: [debug] [uiautomator stdout] test results watcherresultprinter=. > info: [debug] [uiautomator stdout] time: 82.744 > info: [debug] [uiautomator stdout] ok (1 test) > info: [debug] [uiautomator stdout] instrumentation_status_code: -1 > info: [debug] [uiautomator stdout] instrumentation_result: shortmsg=java.lang.securityexception > info: [debug] [uiautomator stdout] instrumentation_result: longmsg=permission denial: getintentsender() pid=21860, uid=2000, (need uid=1000) not allowed send package android 

try this

list<webelement> list  = driver.findelementbyname("log out"); (int 1=0;1<list.size();i++){ system.out.println("clicked on "+list.get(i).getattribute("name")) } 

this give u elements index no name. u can click on specific index eg:-list.get(6).click();


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -