Comments (28)
@renelux - I just ran your test on my machine and it's definitely setting the locale and language to French. In fact, it fails because of the following line in your test, since the text is now in French.
By selector = By.xpath("//UIAStaticText[contains(@name,'climbed')]");
from selion.
@azaytsev I am still running in to the same issue. Can you please tell me what Xcode you are using? And what simulator. I am on the latest version for both and I am not sure if it is supported correctly.
Is there a way to set the simulator that I want to use?
from selion.
@renelux, I was able to test with both XCode 6.0.1 / IOS 8.0 simulator and XCode 5.1.1 / iOS version 7.1
The answer to your second questions is yes, you can specify which simulator to use with capabilities (in IOSDriver) but i don't believe SeLion exposes that function at the moment.
For example:
IOSCapabilities cap = IOSCapabilities.iphone("InternationalMountains", "1.1");
cap.setCapability(IOSCapabilities.SIMULATOR, true);
cap.setCapability("simulatorVersion", "7.1");
cap.setCapability("sdkVersion", "7.1");`
from selion.
I am running Xcode 6.1 and the default Simulator runs iOS 8.1.
I will see if I can added the functionality to SeLion to specify the simulator and SDK version.
from selion.
Rene
You don't need to be adding that. We already have a mechanism in SeLion using which you can add up your own custom capabilities.
For more information please take a look at the javadoc for
ConfigProperty.SELENIUM_CUSTOM_CAPABILITIES_PROVIDER
- Cheers
Krishnan.
Sent from a mobile.
So if you noticed any typos you know whom to blame π
-------- Original message --------
From: RenΓ© Lux [email protected]
Date:11/18/2014 07:12 (GMT+05:30)
To: paypal/SeLion [email protected]
Cc:
Subject: Re: [SeLion] @mobiletest iOS not honoring locale and language settings (#53)
I am running Xcode 6.1 and the default Simulator runs iOS 8.1.
I will see if I can added the functionality to SeLion to specify the simulator and SDK version.
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-63409426.
from selion.
@krmahadevan the down-side of using a custom capabilities provider here is the customization will apply to all tests for iOS which may not be the desired outcome.
from selion.
Doug
The effect can be nullified by isolating such tests into a separate suite file and then use it to run them.
If that doesn't work the only other option I see is to either enhance the @mobiletest annotation and add an attribute using which one can pass in a custom capability provider ( I don't want to add attributes directly to the annotation ) or we could just define a new annotation itself @CapabilityProvider and then use this.
I would prefer the new annotation approach and extend this to @webtest as well.
- Cheers
Krishnan.
Sent from a mobile.
So if you noticed any typos you know whom to blame π
-------- Original message --------
From: Doug Simmons [email protected]
Date:11/19/2014 01:39 (GMT+05:30)
To: paypal/SeLion [email protected]
Cc: "Mahadevan, Krishnan" [email protected]
Subject: Re: [SeLion] @mobiletest iOS not honoring locale and language settings (#53)
@krmahadevanhttps://github.com/krmahadevan the down-side of using a customer capabilities provider here is the customization will apply to all tests for iOS which may not be the desired outcome.
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-63536134.
from selion.
@renelux I'm working on enhancing @mobiletest annotation to support additional attributes to allow the enduser to specify the sdk version as well as device variation (iphone5, iphone6, etc), however, I've discovered a bug in ios-driver which needs to be fixed before this can be accomplished. I'm working on issuing an ios-driver pull request to address it. Will keep you posted as when this is ready to go.
from selion.
@azaytsev thanks. I tried to implement the CustomCapabilities provider but it didn't solve my issue. I will wait for your update to see if I have more luck.
from selion.
@azaytsev
I am not sure if its a good idea to start enhancing the @MobileTest
annotation with attributes that are either specific to the iOS platform or the Android Platform. Instead I was hoping that we would merely add an annotation say @CustomizeCapabilities
which would accept a fully qualified class name of a custom capability provider and SeLion would internally use the similar mechanism that TestNG currently uses for data provider class names and then work with it.
When you say you tried to implement CustomCapabilities Provider and it didn't work, what do you mean ? What exactly did you try ? Can you please help elaborate ?
from selion.
@krmahadevan I don't see anything wrong with changing the acceptable values for @MobileTest String device()
such that it can receive iphone
(existing support), ipad
(existing support), android
(existing support), android{x}
(existing support), iphone{x}
(new), and ipad{x}
(new).
from selion.
@krmahadevan I created a CustomCapabilities provider that extends the DefaultCapabilitiesBuilder. To the Capabilities I add the following parameters
capabilities.setCapability("simulatorVersion", "7.1");
capabilities.setCapability("sdkVersion", "7.1");`
In the console I see that these capabilities have been add. But the simulator that starts is still iOS 8.1 so it seems that the value is ignored.
I am thinking to downgrade Xcode and the iOS SDK to see if that helps.
from selion.
That's interesting. So the capabilities part works. Just that the remote server responsible for spawning the simulator is not honoring the capabilities so to speak.
This may require a bit more investigation to see where does the problem lie.
In the meantime can you please check on the following ?
- Spawn a local grid.
- Spawn a ios node and hook it on to the local grid.
- Try running the same test against the local grid ( runLocally=false) and share the results ? You may need to tinker selion to temporarily remove an edit check which prevents remote executions for iOS [ I don't quite remember if it's still there or has been removed ]
- Cheers
Krishnan.
Sent from a mobile.
So if you noticed any typos you know whom to blame π
-------- Original message --------
From: RenΓ© Lux [email protected]
Date:11/20/2014 15:30 (GMT+05:30)
To: paypal/SeLion [email protected]
Cc: "Mahadevan, Krishnan" [email protected]
Subject: Re: [SeLion] @mobiletest iOS not honoring locale and language settings (#53)
@krmahadevanhttps://github.com/krmahadevan I created a CustomCapabilities provider that extends the DefaultCapabilitiesBuilder. To the Capabilities I add the following parameters
capabilities.setCapability("simulatorVersion", "7.1");
capabilities.setCapability("sdkVersion", "7.1");`
In the console I see that these capabilities have been add. But the simulator that starts is still iOS 8.1 so it seems that the value is ignored.
I am thinking to downgrade Xcode and the iOS SDK to see if that helps.
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-63785514.
from selion.
Doug
Nothing wrong in adding attributes to the @mobiletest annotation as long as they are common to both ios and android. My only concern is that we shouldn't be adding attributes to this annotation that are ios or Android specific. If there is a need for such a requirement then I think we should think of handing it in a different manner ( for e.g via a new custom annotation that can be used in conjunction with both MobileTest and WebTest annotation )
- Cheers
Krishnan.
Sent from a mobile.
So if you noticed any typos you know whom to blame π
-------- Original message --------
From: Doug Simmons [email protected]
Date:11/20/2014 11:20 (GMT+05:30)
To: paypal/SeLion [email protected]
Cc: "Mahadevan, Krishnan" [email protected]
Subject: Re: [SeLion] @mobiletest iOS not honoring locale and language settings (#53)
@krmahadevanhttps://github.com/krmahadevan I don't see anything wrong with changing the acceptable values for @mobiletest String device() such that it can receive iphone (existing support), ipad (existing support), android (existing support), android{x} (existing support), iphone{x} (new), and ipad{x} (new).
β
Reply to this email directly or view it on GitHubhttps://github.com//issues/53#issuecomment-63764358.
from selion.
@renelux its because of the bug in ios driver that Alex mentioned above
from selion.
@renelux issued a pull request in ios-driver for the bug fix. ios-driver/ios-driver#327
If you want you can try checking out my ios-driver branch building it locally and seeing if that fixes your issue. (https://github.com/azaytsev/ios-driver/tree/azaytsev_classcast_exception_fix)
I'm also working on adding iphone{x} capability to SeLion which will allow you to specify the sdk version you want to run with.
from selion.
@azaytsev it seems that your bug is solving the issue. Or atleast I now get a different kind of error.
Unable to get UUID for device iPhone Retina (4-inch) with SDK 7.1
I guess this is because I don't have the proper SDK installed yet. Any pointers on how I can install a older SDK besides the latest version? If I remove the SDK version from my CustomCapability it will just start the iOS 8.1 simulator.
Edit: Already found a document that is helpful with installing older Xcode versions. http://docs.appcelerator.com/titanium/3.0/#!/guide/Installing_the_iOS_SDK-section-29004875_InstallingtheiOSSDK-Xcode incase other users ever need it.
from selion.
@renelux You are close. I am still working on adding functionality to SeLion to allow users to specify device variation via annotation. In the meanwhile you should be able to fix it by adding another capability.
capabilities.setCapability(IOSCapabilities.VARIATION, DeviceVariation.iPhone5s);
There is also a way to run multiple version on XCode on one machine and be able to switch between them (I currently have this setup). I'll publish the instructions on how to do it some time next week when I come back from PTO.
from selion.
@renelux
As azaytsev mentioned you can install multiple versions on Xcode in the same machine and use either one to run the simulator. I am giving an approach I follow.
I have installed Xcode 5.1.1 into the folder '/Applications/Xcode5.1.1' so my Xcode.app sits under '/Applications/Xcode5.1.1/Xcode.app', but I still have Xcode 6 installed under '/Applications/Xcode.app' don't disturb this. In your terminal fire the command 'xcode-select -p' which gives you the currently installed Xcode version mine says '/Applications/Xcode.app/Contents/Developer/', so its Xcode 6. To switch to Xcode 5.1.1 (you need sudo access) fire the command 'sudo sudo xcode-select -s /Applications/Xcode5.1.1/Xcode.app/Contents/Developer/'. This will switch to Xcode 5.1.1 and iOS simulators 7.1.
from selion.
@kumaravel-jayakumar thanks, I already found a article that suggests the same thing. I am currently downloading version Xcode 5.1.1 and Xcode 6.0.1 as it seems that @azaytsev got it working. I will update this thread once it works.
from selion.
@azaytsev
I have got a similar error 'Unable to get UUID for device iPhone Retina (4-inch) with SDK 7.1'. This happens if you have downloaded iOS 7 simulator in Xcode 6. I used to fix this issue by requesting for iPhone 5s, if you do this it will not show up this error. This error is because ios-driver sets iPhone Retina (4-inch) as its default device while choosing SDK version 7.1. iOS 7 simulator in Xcode 6 does not have the device iPhone Retina (4 inch).
from selion.
@azaytsev I got it working on Xcode 5.1.1 and SDK 7.1 but with Xcode 6.0.1 and SDK 8.0 the InternationalMountains app crashes.
Is the version linked on the ios-driver website compatible with iOS 8?
from selion.
@renelux
Where did you get your InternationalMountains application?
from selion.
@renelux fyi - ios-driver/ios-driver#327 is merged
from selion.
@renelux - Take a look at my branch here(https://github.com/azaytsev/SeLion/tree/azaytsev-ios-mobiletest-enhancements). It's still a work in progress but I've added capabilities that allow you to specify the sdk version and/or device variation via annotations.
Take a look at NativeAppDemo.java class for some code samples. This should resolve you issue of being able to launch an app in different version of sdk/phone variation without actually having to install multiple versions os XCode.
from selion.
@renelux is this still an issue or can this ticket be closed?
from selion.
I'll close this when we merge the new code to SeLion for specifying SDK version. :)
from selion.
new code merged to develop branch. closing this.
from selion.
Related Issues (20)
- Parameter autoscreenshot is not working for mobile HOT 4
- Better support for pages with asynchronous requests. HOT 4
- Unable to create remote sauce session with SeLion 2.0.0-SNAPSHOT HOT 3
- Selion report is showing the results twice. HOT 1
- No support for appium MobileBy locator types. Cannot find mobile elements by accessibility id. HOT 1
- Query: Parallel & Distributed execution HOT 5
- Does SeLion provide cucumber BDD Support? HOT 1
- Provide the capability to retry failed to tests HOT 3
- Using Grid.driver() we are not able to get FindElementAccessbilityId Issue,please check HOT 2
- NullPointerException with SelionAssert.assertXXX in DataProvider HOT 1
- exception override by softassertion error stack in SeLionAssertsListener.java HOT 1
- Need New Plugin to scan accessibility issues in source code HOT 4
- Selion Dependency Issue HOT 1
- [SECURITY] Releases are published insecurely HOT 4
- NullPointerException with webElement.sendKeys(keys) from UIATextField HOT 1
- java.lang.NoClassDefFoundError: org/openqa/selenium/remote/JsonException HOT 1
- SeLion - Getting Exception : java.lang.ClassNotFoundException: org.openqa.grid.selenium.GridLauncher$GridItemLauncher HOT 1
- Getting exception - cannot create a temp directory while running tests . HOT 2
- Hello, HOT 2
- Error: Forwarding the new session Empty pool of VM for setup Capabilities HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selion.