You may wish to
review:
https://jkotests.wordpress.com/2012/08/28/locate-element-via-custom-attribute-css-and-xpath/
else something as simple as
browser.text_field(:class,"ng-pristine ng-valid
ng-touched").send_keys('thefilename')
The checkbox code eludes me, This looks like the remove feature where
something like.
browser.span(:text,"Remove").click
On Tuesday, July 14, 2015 at 7:49:34 AM UTC-5, Mahesh Mesta wrote:
>
> Hi,
>
> I am very new to watir. I have been trying to test the edit profile of an
> application.I need to set and clear a checkbox, upload an image file and
> enter some text in the angular rich text editor for testing.However I am
> not been able to do either three of them.
>
> (1).For check box the angularjs elements go as follows
>
> <md-checkbox aria-label="Remove" aria-invalid="false" aria-checked="false"
> tabindex="0" class="ng-pristine ng-valid md-default-theme ng-touched"
> role="checkbox" ng-model="user.remove_photo" style="margin-top: 0px;"><div
> class="md-container" md-ink-ripple="" md-ink-ripple-checkbox=""><div
> class="md-icon"></div></div><div ng-transclude="" class="md-label"><span
> class="ng-scope">Remove</span></div></md-checkbox>
>
> I need to check and uncheck the checkbox.
>
> (2) For uploading the image file, the elements are as follows
>
> <input aria-invalid="false" tabindex="0" class="ng-pristine ng-valid
> ng-touched" ng-model="user.photo"
> onchange="angular.element(this).scope().file_selected(event)" type="file">
>
> I need to upload a profile pic i.e an image file
>
> Kindly help me to get the solution for them using watir webdriver. I would
> really appreciate it.
>
> Regards,
> Mahesh.
>
>
>
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.