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

Adding capability to specify sdk version / device variation via Webtest ... #62

Closed

Conversation

azaytsev
Copy link
Contributor

Addressing ticket #53. Adding capabilities to allow a use to specify sdk / device variation

@mach6
Copy link
Contributor

mach6 commented Dec 16, 2014

Does this PR include the changes @binhvu needs?

@binhvu
Copy link

binhvu commented Dec 16, 2014

@mach6
Yes. It has all the common parameters that selendroid needed. I will need to work with selendroid first then come back to work on SeLion.

public String getDevice() {
if (device.contains("android") || device.equalsIgnoreCase("iphone") || device.equalsIgnoreCase("ipad")) {
if (device.contains("android") || device.contains("iphone") || device.contains("ipad")) {
if (StringUtils.contains(device, ":")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to use StringUtils.contains and StringUtils.split ? Can we not just use device.contains and device.split here ? I believe StringUtils basically shields you for null values, but if that were the case then the parent if condition itself would be throwing a NullPointerException because we have not shielded the code there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krmahadevan good point. I'll add an NPE check and switch it to using device.contains/device.split

@azaytsev azaytsev closed this Dec 17, 2014
@azaytsev azaytsev deleted the azaytsev-ios-mobiletest-enhancements branch December 17, 2014 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants