Trying to launch url in Edge with IE compatability mode using robotframe work python - python-2.7

I'm Trying to launch url in Edge with IE compatibility mode using robotframe work python and I'm using below code but getting this error AttributeError: 'Options' object has no attribute 'attach_to_edge_chrome' . Can some please help on this
code used:
Open Browser url ie options=ignore_zoom_level=True;attach_to_edge_chrome=True; edge_executable_path="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

You could use Maximize Browser Window to maximize the browser window. Please refer to the sample code below (you can change the path to your owns):
*** Settings ***
Library SeleniumLibrary
*** Variables ***
${IEDriver} E:/webdriver/IEDriverServer.exe
*** Test Cases ***
Example Test
Open Browser https://www.google.com/ ie executable_path=${IEDriver} options=ignore_zoom_level=True; attach_to_edge_chrome=True; edge_executable_path="C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
Maximize Browser Window
Robot Framework version: 5.0.1
SeleniumLibrary version: 6.0.0

Related

Running Robot Framework tests with VirtualBox and IE11

I'm a Linux user, but I have a need to run my Robot Framework tests with IE11. I have set up Virtual Box with Win7 + IE11. I set up system and run below test there:
*** Settings ***
Library Selenium2Library
*** Test Cases ***
Run a browser
Open Browser http://www.google.com ie None http://192.168.56.101:4444/wd/hub
Now in virtual machine IE is opened and www.google.com page is opened. So this simple test is working fine.
I'm just wondering, what would be best way for me to run actual tests in virtual machine. I have a lot of tests. Can I somehow give address http://192.168.56.101:4444/wd/hub to command line somehow with start command?
Or do I have to make special keyword to check, how to start testing.
Any suggestions? How have you solve this issue?
When you are using robot framework, you can declare this information in the command line using the appropriate arguments. An example of this could be formatted like:
robot --include smoke --variable HOST:[host_IP] path/to/tests/
This information can be found in more detail here:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#id142

Robot Framework: "Library" not found

My very first script in Robot with PyCharm tells me the following error message:
[ ERROR ] Error in file 'C:\Desktop\MyProjects\first_test\1stTest.robot': Setting variable 'Library' failed: Invalid variable name 'Library'.
The beginning of my script has nothing special, you can see it here:
*** Settings ***
Documentation This is a simple robot example
Library Selenium2Library
*** Variables ***
${SERVER} http://google.com
${BROWSER} Chrome
${DELAY} 0
I installed selenium2library using pip without any problem or message error. Still in my code when I write in PyCharm, on the first line Documentation is displayed in orange, however Library is displayed in different orange, like grayed out...
Can you help me with that?
Is the above from one file and in that file EXACTLY how you have pasted above? Is there more to it below perhaps including the text Library?
To my mind this error could only occur if you have Library in the variables section? Is your settings section correct? Perhaps some invalid syntax so it's not being properly considered?
There should be only 1 space between Library and Selenium2Library. That should fix that

c++, Voce - how to compile a project?

My problem is that I wanted to try out Voce, however I wasn't able to start a sample program. I had to tweak lots of things, and as I can see the only remaining barrier between me and Voce is the following error(hopefully):
whenever I compile the sample program, it compiles succesfully but then, when I would like to launch it it gives me the following error:
[Voce] Java virtual machine created
[Voce ERROR] The requested Java class: voce/SpeechInterface could not be found. Make sure the class path correctly points to the Voce classes.
This is a speech recognition test. Speak digits from 0-9 into the microphone. Speak 'quit' to quit.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f0824ffcbd2, pid=7537, tid=139672968279936
#
# JRE version: OpenJDK Runtime Environment (8.0_72-b15) (build 1.8.0_72-internal-b15)
# Java VM: OpenJDK 64-Bit Server VM (25.72-b15 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x651bd2]
#
# Core dump written. Default location: /home/username/testAudio/folder/core or core.7537
#
# An error report file with more information is saved as:
# /home/username/testAudio/folder/enter code herehs_err_pid7537.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
This is the whole ouput.
Further information: I'm using Kubuntu as an OS(so Linux, basically).
Thank you in advance!
Meanwhile I was able to fix this issue.
I will post the solution in case anyone will experience the same issues:
I just had to edit the cpp files to match the location of the lib folder, because my program couldn't find it.

:-1: error: Automatic patching failed at C:\QtSDK\Symbian\SDKs\Symbian1Qt473\bin\createpackage.pl line 357

I've installed Qt SDK 1.2.1, and when I'm building one of the example applications - Haptics Player, for Symbian S60, using Qt 4.7.3.
The example compiles successfully, but it fails on the Deploy step. This is the compiler output:
ERROR: Automatic patching failed at C:\QtSDK\Symbian\SDKs\Symbian1Qt473\bin\createpackage.pl line 357.
make[1]: *** [ok_sis] Error 2
C:\QtSDK\Symbian\SDKs\Symbian1Qt473\epoc32\tools\make.exe: *** [sis] Error 2
01:38:16: The process "C:\QtSDK\Symbian\SDKs\Symbian1Qt473\epoc32\tools\make.exe" exited with code 2.
Error while building project hapticsplayer (target: Symbian Device)
When executing build step 'Create SIS Package'
However, a newly created, empty project runs on my phone successfully, i.e. this error happens in the Example project that ships with Qt SDK, but not for a newly created project.
How do I fix this error?
Upon closer inspection of the compiler output, I noticed this:
Patching: Executable with capabilities incompatible with self-signing detected: "hapticsplayer_patched_caps.exe". (Incompatible capabilities: "ReadDeviceData", "WriteDeviceData".) Reducing capabilities is only supported for libraries.
Patching: Unable to patch the package for self-singing.
Use a proper developer certificate for signing this package.
Apparently, the capabilities WriteDeviceData and ReadDeviceData can't be used for self-signed packages, and require a proper developer's certificate (which is not free, and I don't have it).
Removing those lines from the .pro file fixed the problem, and Haptics Player now compiles:
symbian: {
TARGET.CAPABILITY = WriteDeviceData ReadDeviceData
}
It seems it does not really need those capabilities, I have no idea why they were added. Probably an oversight.

Firebreath plugin on windows fails to load in chrome

I am busy converting by existing firebreath plugin here to use gpgme instead of making calls via the OS and the gpg binary.
I have managed to get the code to compile in windows using VS 2010 on a x32 system but after loading the plugin into chrome I can not access the npapi code at all. Even simple version calls fails.
When loading the plugin I get no visible errors but when using sawbuck log viewer for chrome I get the erorr messages below.
.\renderer\webplugin_delegate_proxy.cc 347 PluginMsg_Init returned false
..\plugins\npapi\webplugin_impl.cc 271 Couldn't initialize plug-in
I have tried to use my code with both firebreath 1.4 and 1.6 and neither versions work. After some simple debugging it seems that using any code provided by gpgme (whether its called or not) causes the plugin to break.
I came to this conclusion by doing the following.
Created a new project with firebreath (versions 1.4 and 1.6)
Add the gpgme.h headers to gmailGPGAPI.cpp and changed nothing else aside from adding the required reference paths to the project.
Build the project to create the dll (this generates the dll fine).
Replace the existing ddl in my project with the dll in step 2 and test it with the following piece of code
plugin = document.createElement('object'); plugin.id = 'plugin';
plugin.type = 'application/x-gmailtest';
document.body.appendChild(plugin);
console.log("my plugin returned: "+ plugin.valid);
console.log("my plugin returned: " + plugin.version);
This returns valid = true and the version returns what ever i set it to.
I then modified gmailGPGAPI.cpp to now return the gpg version by calling gpgme_check_version(NULL) in the version method. I used that method because its probably the simplest returning function that I could test with.
Build the plugin and copy dll to chrome extension as in step 3-4. The plugin builds fine again as expected.
Load the plugin and try to execute the code in step 4 at which point it now just returns undefined for any property or method i try to access on the plugin. No errors are printed to the console or anywhere else in chrome except for the error logged to sawbuck.
I have got no idea where to look or what to try since I cant seem to get an actionable error to work against. I have also reduced by test code to the point where its just a new project with a one line change to make it easier to find the problem.
I should note the code in the repo builds fine in linux/OSX and loads into chrome correctly so I know at some level my code does work.
Two possible paths:
You may have a DLL dependency that isn't available which keeps the plugin from loading; if you run regsvr32 on it in the state where it doesn't work on chrome, does it work?
Your plugin may be loading and then crashing. Start chrome with --plugin-startup-dialog and then when it pops up a dialog warning you that a plugin is about to be loaded attach to that process and see if the process crashes. At this point you can also set breakpoints to try to figure out how far it gets.
Double check your metadata in PluginConfig.cmake as well; sometimes unusual characters in some fields can cause issues like this.