Monkeytalk : I cannot run javascript - ios-ui-automation

I am trying to automate my IOS app using monekytalk but here is the issue :
In Monekytalk we can export mt(monkeytalk script) to JS (java script) and edit it
1stly : i dont get that run tool bar on top when js is focused
But when i focus on mt file that run tool bar comes
Even if i run , it runs it's mt script files and not Run js
I have gone through may pdf and every where it is written that if js file is there it by default runs the js file but actually it does not happen.
Can some one please help me in this i am doing it for IOS
Thanks

mt file will be must, and you can export mt file to js file and then changes in js file with all programming logics and then call that js file inside mt file...example
login.mt file will have command Script login.js Run. and you can get run till bar only when mt file is focused however in this way you are running you javascript code from your mt file...hope it would help.

mt file is must to run the test, you can create a js file and include it in the mt file JavaScript tab using the following
load("myscript.js");
and calling the methods.

Related

testcafe electron mainWindowUrl | what to do with tmp location

When using testcafe-browser-provider-electron, I get stuck with the mainWindowUrl. I have the original source file in the renderer folder, the version that is in the build folder and apparently a temporary created in some random /tmp/ folder. Testcafe suggests the /tmp/ file.
"Use the mainWindowUrl option to specify one of the following pages as the main window page:
file:///tmp/.mount_PROGRAM-Lbt5yL/resources/app.asar/build/renderer/index.html"
With the 6 chars being random.
How can I instruct testcafe that all files are identical?
I expected no error-message
Error: The main window page at file://....index.html was not loaded.
I reproduced this behavior. Please track the issue in the following thread: https://github.com/DevExpress/testcafe-browser-provider-electron/issues/87. We will research it and update the thread once we have any news.
Found out an alternative path to using the AppImage.
Use electron-builder to build a deb-package. Install that as it will always have the same path /opt/... to the unpacked content. You can then use that path in the specification of the mainWindowUrl.

Vue.js - want to lazy load config.json, instead of including at compile time

I'm trying to create a file like the appsettings in a web.config in my vue app, that my vue app can use to load config info at runtime that changes form one deployment level to another (dev/qa/prod)
I'm loading it thusly
Vue.prototype.$config = require('/public/config.json')
but when I look at the transpiled output, it has the values of the file loaded in and hardcoded, not code to load from the file
in app90117256.js: (and js.map)
t.exports = JSON.parse('{""name":"value" etc.....
How do I get it to load the file at runtime instead.
If you want to load the config at runtime, do not use build time constructs, which require or import (or Vue CLI ENV variables) are...
Options:
use either XHR or fetch browser API to request the json file from the server during (or before) your app starts
transform the json into JS file which assigns some global variable (window.appConfig for example), load it using <script> placed in index.html (before your app bundle) and then access it using window.appConfig from the app

Adobe analytics with vue js adding external script

Im struggling to add adobe analytics external scripts to my Vue js project. The client uses Adobe analytics and im battling to add it to the project without the project complaining.
The external adobe script looks like the following:
//assets.adobedtm.com/file.min.js with async
Then it is required that you end it by adding the following just before the closing body tag:
<script type="text/javascript">_satellite.pageBottom();</script>
When the project starts it complains in console that $ is not defined because it is defined in webpack when i start the project and im guessing its not finding the alias.
This is the error:
VM29714:3 Uncaught ReferenceError: $ is not defined
Then further down it complains that it doesnt know what _satellite is:
login:54 Uncaught ReferenceError: _satellite is not defined
I just need the scripts and satellite close to be added to the project, the rest will work once these are added.
Ive tried added the scripts by injecting them into the head tag on runtime but that also doesnt work.
If you are implementing Adobe DTM, you cannot inject the header script dynamically. It must be placed directly on the page without async or deferred attributes.
If you are implementing Adobe Launch, you can inject the header script dynamically and asynchronously. And if you do this, you do not include the footer (_satellite.pageBottom()) code.
Your script example isn't explicit, but the .min portion implies you are using Adobe Launch.
VM29714:3 Uncaught ReferenceError: $ is not defined
This is not directly related to either Adobe DTM or Launch. You may possibly have some other script or code block deployed inside the DTM or Launch interface that references $, but that's a separate issue to work out. Yes, it may be coming from a DTM or Launch script according to the js console, but keep in mind that DTM/Launch is a tag manager. It hosts and deploys other tags/scripts. So you need to do some digging to see which tag/script from which Rule references it. Start by looking at the stack trace to find out where it's coming from.

running dart project says dart:html is not available for the standalone vm

I used Git to pull a project
I then start IntelliJ, and say: Open Project.
The project itself looks like it has 4 modules, Lab1, Lab2, Solution2, Solution2
I open the full project. In Lab1, i want to run to see how my web page looks, but when i say: Run main.dart the error kicked back is:
C:\code\dart-sdk\bin\dart.exe --ignore-unrecognized-flags --checked --enable-vm-service:51293 --trace_service_pause_events C:\code\workspace\tw_remoting_training\codelab_01\web\main.dart
Observatory listening on http://127.0.0.1:51293
The built-in library 'dart:html' is not available on the stand-alone VM.
'package:remoting_training/remoting_printer.dart': error: line 20 pos 1: library handler failed
import 'dart:html';
^
Process finished with exit code 254
Im not sure what is going on here though. As a secondary option, i will also try to Right-Click on index.html and click: Open with > Dartium but that shows a blank page. It shouldve done 4 async calls which printed strings to the screen.
Is there something I am missing? Is it not running because of it being a module in a project?
If your Dart script imports dart:html or a library that imports dart:html you can run that script only from the Dartium browser (by adding a script tag to HTML that points the that Dart script, or if you run it through pub build or dart2js in any browser), but it can't be run from the console.
With dart:io it's exactly the opposite, it can't be run in the browser.

Cannot resolve method 'ok(?)' with Play 2 Framework in Intellij

I have been trying to get play set up in IntelliJ for hours but I can't get it to work correctly.
I continuously get this error: http://imgur.com/MYY8fXI
I have tried create a project though the terminal with:
play new
and then using the terminal to create the idea files with
idea with-sources=yes
I have also installed the play 2 plugin and used it to create the project, but I get the same error.
I am able to use the plugin I downloaded to successfully run the app and view it in my browser, but I keep getting the
Cannot resolve method 'ok(?)' error.
edit: I am using OSX, and have the ultimate version of Intellij.
edit 2: I have made a little progress. If I import the view directly using import views.html.index; it gets rid of the errors on the application. However, if I use import views.html.*; it results in the errors. Any ideas?
At the time of this writing, it seems that play2 support in IntelliJ 13 Ultimate has some minor problems...
How I did solve the issues:
1) Navigate to your project director and start your play console (play.bat / play.sh should be on the PATH)
2) enter command 'compile' in your play console
3) enter command 'idea" in your play console
4a) in case your IntelliJ project was alread open, IntelliJ will detect the changes and suggest to reload the project. Confirm you want to reload
4b) in case IntelliJ was not running, open the project by File | Open... and select your project Directory.
These steps should resolve your issue.
Does it help to make sure that play has compiled the templates to class files, 'run' + open in browser or 'compile'?