I'm using browser.pause() to debug protractor. The navigation says to 'press c to continue to the next webdriver command'; however, pressing c does not do anything in git-bash or powershell
Related
There are some test cases when we need to connect Puppetry to an already ruining instance of chrome. For example you cannot solve reCaptcha with automated tests, but you can do it manually and run the tests on the affected Chrome instance.
So how can we do it?
In order to connect we need to start Chrome in command-line with remote-debugging-port parameter.
Window:
start chrome.exe –remote-debugging-port=9222 --user-data-dir=remote-profile
macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=$(mktemp -d -t 'chrome-remote_data_dir')
Linux
google-chrome --remote-debugging-port=9222
Next we navigate in the started browser to http://127.0.0.1:9222/json/version. On the page we can see a JSON object.
We need to copy the value of webSocketDebuggerUrl property.
In Puppetry we open "Run Tests" modal window (F6), switch to "Browser options" tab and paste the saved value into "WS Endpoint" input.
Now we can press "Run".
I have a project in test complete that contains only Test scripts no keyword testing.
When i run my main script from command line it gives compiler error "file missing". I want to catch this error in cmd and close test complete.
"C:\Program Files (x86)\SmartBear\TestComplete 11\Bin\TestComplete.exe" "C:\Users\Username\Desktop\project\TestProject1\BLABLABLA" /r /p:projectname /u:Scriptname /rt:MainScriptRoutine /run /exit
If you want to make sure that TestComplete is not just stopped with the error message displayed during your night tests, you can run it with the /SilentMode command-line parameter. In this case, TestComplete will not show any GUI dialogs and messages.
I'm using Rstudio in Windows. There is no red octagon for me to click on. I've tried pressing ESC and Ctrl + C and Ctrl + Z in the console but none of those worked.
When running a code, the red octagon will only show while it is working things out. So while it is just running through your written code (reading data and names of things etc) then the octagon will not show.
Pressing ESC will work, unless Rstudio is frozen.
Good luck!
You could also try interrupting/terminating the R session via the menu:
Session -> Interrupt R
or
Session -> Terminate R...
or
Session -> Restart R (Ctrl+Shift+F10)
If nothing else helps, open the Windows command line and kill the rsession.exe proces:
> tasklist | grep rsession
# the output should be something like this:
rsession.exe 7260 Console 1 166,144 K
# The number (7260 in this case; will probably be different) is the process id (PID),
# and you can use it to kill the process:
> taskkill /F /PID 7260
Caution: this will forcefully stop the R session, and RStudio will probably have to restart (this is what happens on my machine, at least).
Using ctrl + alt + delete opens task manager and you can terminate the R session then restart it to continue working.
I cannot run a script in Eclipse that works perfectly in a terminal.
It seems that Eclipse console cannot support some functions. I am looking for a workaround to be able to debug the script using Pydev.
Is it possible to set PyDev to use for example /usr/bin/gnome-terminal instead of the Eclipse native console ?
Otherwise it there a way to define a wrapper as a python interpreter for PyDev that will launch an terminal external to Eclipse (I've tried but failed on that).
Thank you
Nga
Right now, curses-based apps really don't run well inside Eclipse/PyDev, so, you must really launch it externally. To debug you can use the remote debugger: http://pydev.org/manual_adv_remote_debugger.html
If you use Aptana Studio, there's a terminal view which should emulate a terminal better... try running python (i.e.: running your program) from inside that view. If it does work properly there, maybe I could check a way to better integrate there and launch directly in that view.
Thank you for your reply. I have finally defined kind of a wrapper as a bash script calling python in a xterm. Pydev is checking some configuration by calling eclipse/plugins/org.python.pydev_2.4.0.2012020116/PySrc/interpreterInfo.py so the script first echo the format expected by PyDev. here is the script "
#!/bin/bash
# dummy return for Eclipse Pydev - respect interpreter info format
echo "EXECUTABLE:/home/user/python_custom/python_xterm|
|/home/user/eclipse/plugins/org.python.pydev_2.4.0.2012020116/PySrc
|/usr/lib/python2.5
|/usr/lib/python2.5/plat-linux2
|/usr/lib/python2.5/lib-tk
|/usr/lib/python2.5/lib-dynload
|/usr/local/lib/python2.5/site-packages
|/usr/lib/python2.5/site-packages
|/usr/lib/python2.5/site-packages/Numeric
|/usr/lib/python2.5/site-packages/PIL
|/usr/lib/python2.5/site-packages/gst-0.10
|/var/lib/python-support/python2.5
|/usr/lib/python2.5/site-packages/gtk-2.0
|/var/lib/python-support/python2.5/gtk-2.0
|/var/lib/python-support/python2.5/HTMLgen
|/var/lib/python-support/python2.5/pyinotify
|/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode
|/usr/lib/site-python
#
$
|__builtin__
|__main__
|_ast
|_codecs
|_sre
|_symtable
|_types
|errno
|exceptions
|gc
|imp
|marshal
|posix
|pwd
|signal
|sys
|thread
|xxsubtype
|zipimport
"
# activate scrollbar -sb with 6000 lines
# allow logging -l with filename log_$NOW
xterm -g 150x100+0+0 -sb -sl 6000 -si -hold -e "python $*"
that does the job, and I can use Pydev and its debugger
I've built a simple test app with clutter: A stage with two ClutterText actors to display two words. It works OK when I run it from within gnome but running it from the tty (not gnome-terminal or xterm) with xinit my_app_binary I get an error:
failed to create drawable
Unable to initialize Clutter: Unable to select the newly created GLX context
Window manager error: Unable to initialize Clutter
If I run xinit gnome-terminal from the same tty everything works, gnome-terminal shows up in a black screen. That's the same I want to do with my app.
Is there anything I can do to overcome this error?
All the above are tested in Linux Mint 12. After normal boot I switch to a tty (ALT-F1) and stop lightdm (sudo /etc/init.d/lightdm stop).
Thanks!
EDIT: running as root everything works, so the question is: how to run it as a regular user?
Be sure to set the DISPLAY-var - add it in front of your command
DISPLAY=:0.0 /path/to/myapp
Sometimes this is an access-rights problem - the app should be started with the user who started the X-server
su user-started-x -c 'DISPLAY=:0.0 /path/to/myapp'