Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getSize method does not work and throws an server internal exception #10

Open
mukund-billa opened this issue Jul 14, 2017 · 11 comments
Open

Comments

@mukund-billa
Copy link

Hello,

I have observed certain issues when i uploaded my appium testng scripts to AWS device farm. Whenever the driver.manage().window().getSize() method is executed, the AWS gets the unknown server-side error. And also in device farm, whenever i tried to get the location of an element, it gets a null pointer exception.

Appium: 1.6.5
IOS : 10.3.2

Kindly provide any suggestions/workaround.

Thanks,
Mukund

@zelenizub
Copy link

Hello Mukund,

I'm currently facing the same issue with AWS device farm. It is also present for getLocation() call, as probably both calls share some part of implementation.
After further research on this, I've found out that reason behind it is miscommunication between Appium on server side and the device. It reports that iOS native class is not key-value coding compliant for key “wdWidth”.
Also I've tried working around it by using getAttribute("rect") method on a WebElement, which returns a string from which both location and size values can be parsed. Although it works on both AWS and in local runs, there is a difference in format it returns. Here are the examples:

Local: {x=0, width=375, y=64, height=603}
AWS: {size={width=374, height=603}, origin={x=0, y=64}}

So when parsing the components out, you should find out which is returned format and adapt to it.

Good luck,
Zeljko

@mukund-billa
Copy link
Author

Hey Zeljko,
Thanks a ton for your workaround. Let me do some code tweaks based on your suggestion and see if that resolves the issue.

@mukund-billa
Copy link
Author

Also, the is there any other way where we can get the size of the device window. As of now, i am unable to get the size of the device window in AWS device farm using getSize method of Window. Locally, the methods are working fine the issue is always crop up whenever the code runs in AWS Device farm platform.

@zelenizub
Copy link

zelenizub commented Jul 28, 2017

Hi Mukund,
I forgot to mention that getAttribute("rect") would work only on iOS. Didn't take Android into account, as your first post was about the iOS issue.
But anyways, for Android getSize() and getLocation() is working fine, so there is no need for a workaround there.
Best,
Zeljko

@mukund-billa
Copy link
Author

mukund-billa commented Jul 28, 2017

Thanks for the quick reply zeljko, I tried getAttribute("rect") for IOS and its working fine, i will parse it with respect to AWS data.If there are any suggestions for getSize() of window with IOS will be helpful.

@nikhil-dabhade
Copy link
Contributor

@mukund-billa : Is this still an open issue ?

@mukund-billa
Copy link
Author

the issue is resolved but still the swipe is not functioning in AWS device farm on IOS devices.
Do we have any other suggestions/workaround on swipe functionality on IOS devices in AWS device farm.

@bjmorales
Copy link
Contributor

@mukund-billa We recently fixed some issues with WebDriverAgent on our side. Can you please verify if you are still seeing issues on Appium 1.6.5?

@nikhil-dabhade
Copy link
Contributor

Is the issue discussed here related to the appium sample tests on this repository ?

@mukund-billa
Copy link
Author

mukund-billa commented Sep 22, 2017

Its in general issue which is being observed in AWS Device Farm for IOS Devices.

@reaniwen
Copy link

Hi Mukund,

If you are still suffering with this issue or swipe issue, please provide us the run URL for the latest run less than 30 days. We would more than happy to help you solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants