UI Automation - how to capture - record using javascript editor - mobile-safari

MobileSafari.app doesn't have accessibility labels
is there a way to capture (record) events so that i can use in the javascript for UI Automation?
there was a previous post which made that statement but didn't provide any instructions as to how to record using the javascript editor
details please
thank you in advance!

Just open a new script in your Instrument session, and push the little record button at bottom of the page (appears on the screenshot). Now use your app and you should get that kind of stuff:
Now you can see the value or the name of your buttons and use it to write your own scripts. I'm not a programmer, so this tool is very useful for me.
Hope it will be for you too. :)

First print the element hierarchy on any object you want and you can access the elements through indexing.
Ex:
target.logElementTree();

Related

retrieve form element to generate next element (google-script)

A bit of a noob so please forgive me.
I am working on a project using Google Sheets and Google Forms. I would love to use javascript and html but I am required to use google.
I have a google form with a drop down. I need to read the value of the drop down and pass it to a google script I have written. The script will populate the values for another question in the same form based on the dropdown value. I need to retrieve the value before the form is submitted so I can create the second question.
Can this be done all on one page?
If not can I create a second page in the form and read the value when the next button is clicked?
I appreciate any info and feedback you can provide. I have tried looking around on the internet but haven really found solutions that helped me, at least not that i understood.
Thanks

Custom Google Form? Example of Google Form API?

I'm trying to make a google form look like my own site. I found examples of how to do this on How to style Google Forms and google-custom-form (GitHub project), but I tried both of the examples they give and they seem to fail now.
I had a look at Class Form - Google Apps Script which seems to be like an API, but I can't get my head around the documentation. Does anyone have an example of it working. Or has found another way of getting this to work? It would be really handy to do as embedded forms look really out of sync with the rest of the site.
The API you're linking to is an apps script API. This is needed if you want to create dynamic forms (dynamic amount of questions, dynamic answers,...) but not for custom styling. An intro to appscript can be found on this page: https://developers.google.com/apps-script/
You could just create a form manually on https://www.google.com/forms/about/
You can change the styling and colors in the top-right of the page. When you are ready to embed the form on your own page you have to press "SEND", an select the embed icon <> at the top.
I've worked with this a ton, and still have issues with it. Been learning the new api v4 for sheets but still having trouble, it is still in beta too. For now I can recommend this solution though by heaversm on github.
https://github.com/heaversm/google-custom-form
The example fully works as long as you find the entry.xxxxxxx for each field and replace in the appropriate js. To avoid the embed issues, give your form submit on a click function that has the event as the input and then preventDefault on the event like so:
$('#submit-button').on('click', function(event){
event.preventDefault();
// continue code from heaversm
});
Hope this works for you. Cheers

google analytics event tracking for PDF downloads, Generic approach

I need to implement the GA tracking event for PDF file downloads, For that had searched a lot and found out many code where i can add some code to links and track them from GA's content section, But the problem is I do have a lot of PDF link on the page and don't want to edit every link and I want the code to be generic for future uploaded links also.
So what would be the best approach for this task, Any referral links would do or any code would be highly appreciated .
Thanks in advance.
You can explore the use of Google Tag Manager, where you can create a generic tag that will return to you information for each individual link. GTM uses things called "macros" which is like a template that returns useful information including the clicked element's ID, or pathname (which in your case for the PDF files, would all be different). So in this way, you would only need to call this macro each time a PDF file is clicked. No coding is involved using this standard approach through GTM. Here's a link to a descriptive explanation: http://porcelainduck.com/2014/03/track-pdf-downloads-google-tag-manager/. You can see that it uses the {{element URL}} macro that returns the PDF's unique URL. GTM not only applies to current links, but also all future links.
Based on the tags which you've used to mark your question with you're using C#, ASP.NET
If that's the case, can't you create a base page that on rendering replaces all the
I would recommend adding a click event with JQuery to all links or all links inside the download widget class. Inside the click handler I would then grab the link text and use that as part of the Google analytics event you fire.

ASP.NET GridView/ListView Print Functionality

I'm trying to give users an ability to print asp.net gridview/listview report. Could anyone please guide me how it's best achieved?
Ability to export to Excel/PDF would be good as well.
Thank you in advance.
Set up a print stylesheet that strips out everything you don't want on the page.
Have a javascript print button for printing the page.
Job done.

Drupal, Views: using AJAX to load the complete node?

I've a View page with all the content of my website (the node headers). When I click on one of these header I would like to load the complete node without refreshing the page and display it on the left.
Can I do this with Views (I mean.. does it have a functionality to load a complete node and add it to the current page ?
thanks
I think it is possible using Views. Views is much more than just SQL generator.
Views can work with Fields, or with full node. Set it to full node.
Views can work with Ajax - set it to "yes" (I think it is Yes by default).
It is hard from your description to understand the whole picture, so I can't lead you any further. All I can say is that I use Exposed Filter with Ajax and load full node properly, chaning the content of the page.
Hope I helped,
You are welcome to ask me directly for further support.
Regards,
Shushu
No. Views is basically an SQL query generator. You can do what you describe with javascript, but I don't know what modules might be helpful.
Check out Modal Frame - http://drupal.org/project/modalframe
Basically, your view displays just the title, and you have "link title to node" enabled. Rather than jumping to node page, u want to display node content in modal frame pop up.

Resources