robot framework python unable to open browser - python-3.x

I am new to robot framework python, I am using eclipse RED editor.
*** Settings ***
Documentation Simple example using SeleniumLibrary.
Library SeleniumLibrary
*** Test Cases ***
MyFirstTest
Log Hello World...
FirstSeleniumTest
Create Webdriver chrome executable_path=/Users/ljames/Downloads/chromedriver
Open Browser https:google.com chrome
Close browser
I am seeing following error msg:
TypeError: 'module' object is not callable
I am using mac. how to fix it? "Chomedriver" file exist in the Downloads path mentioned above.

Try changing the driver_name from chrome to Chrome. (Only with Open
Browser Keyword, the browser_names are case-insensitive). Make note- Create webdriver keyword is mostly followed by Go to, since you have already created your driver instance.

In addition to what aravinth_2442 has said, you also have a wrong URL as an argument to Open Browser keyword. It might be just a typo here in your question, but you should correct it as well to:
Open Browser https://www.google.com Chrome
You can see the official documentation here: https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser So make sure, you type correctly the names of browsers, they are case-sensitive.

Related

Chrome Extension built on a Mac works fine, does not work when built on Windows or WSL2

Developer A created a Chrome extension in a Mac environment. Built, tested, published and working for all end consumers.
Developer B cloned the repo used to create the extension, built it in a Windows environment and the Chrome extension fails when posting data to an external API. The same is true when building the extension in a WSL2/Ubuntu environment.
Basic Troubleshooting
Verified developers are using identitical npm and node versions
Verified the zipped extension, built in a Mac environment, works when tested locally in a Windows environment
Odd Behavior of Extension Built in Windows
A popup created by the extension contains an error not present in the 'good' version.
popup.js:2 Uncaught SyntaxError: Invalid or unexpected token
And the offending line:
let payload = {}; // Object to hold data payload
Extension retrieves configuration data from a secure external API
Extension does not post data to a secure external API and does not report any API connectivity errors
Have any of you encountered this? If so, penny for your thoughts.
Update: VSC claimed the file was in UTF8 and, to be thorough, I re-saved the file as straight UTF8. The issue persists. (Thank you for the suggestion, wOxxOm)
We brought another developer into the mix and found the problem.
Turns out npm build isn't sufficient. Our process required npm run start in order to create a working deployable extension.
I will expand my answer if I invest the time into determining why this is.
Thanks again.

Referencing UI5 controls from Unix based systems fails

I'm creating a NodeJS based application with sapui5 framework but I'm facing a problem.
My app and view work well in my Windows 10 environment. Now I'm trying to continue developing it in Ubuntu but I'm facing this problem in Checkbox.js:
The resource from http://localhost:8000/resources/sap/m/Checkbox.js was blocked due to MIME type ("type/html") mismatch (X-Content-Type-Options: nosniff).
Uncaught (in promise) Error: failed to load 'sap/m/Checkbox.js' from resources/sap/m/Checkbox.js: script load error
As you can see, the control does exist:
All other controls work normally. So when I remove the checkbox, my view works without problems.
See the section Console shows Uncaught Error: failed to load 'sap/m/xxxxx.js' from the doc.
And the reply by Tobias (tobiasso85) on the same issue:
Serving the resources depends on the server and its underlying filesystem used.
While Unix based systems are case-sensitive,
Windows is not case-sensitive by default.
I.e. in your view, you must have somewhere <Checkbox> which works on Windows but not on Ubuntu.
→ Change it to <CheckBox>.
Same applies to <ComboBox>, <LightBox>, <FlexBox>, ... etc.
Bonus: there are Breadcrumbs from the sap.m lib and BreadCrumbs from the sap.uxap lib. 👍
PS: when working in an IDE or editor that supports VSCode extensions, consider installing the official UI5 Language Assistant. That extension would've notified you that something is wrong:
The "Combobox" name is neither a class name in the "sap.m" namespace nor an aggregation of the <parentControl> class.

Debugging WebAssembly with node

Is is possible to debug a wasm module through node?
I am using vscode and compiling with emcc -g4 --source-map-base. Putting a breakpoint in the C source file is ineffective. Trying to debug with node inspector node --inspect through Chrome doesn't allow me to use breakpoints either, although it is possible to debug wasm modules from regular web pages in Chrome.
I am using nodejs v10.13.
WebAssembly Source Maps is supported by both Firefox Developer Edition (in screenshot) and Chrome 71.
What you forgot is, to include a path to the source map. For example:
emcc -g4 --source-map-base http://localhost:8000/
Every source files path is prefixed with http://localhost:8000/ with this option. So replace this with your source directory.
So, I managed to get something working. I installed:
Node v11.4
Chrome beta 71 (because of this)
And launched the node process with node --inspect, for attaching the Chrome DevTools.
Moreover, in my code, instead of doing WebAssembly.instantiate in one shot (supplying directly the bitcode), I do it in two steps: WebAssembly.compile first, and then WebAssembly.instantiate. As soon as compile gets executed, there are some "wasm" sources being made available in the DevTools. This is the WebAssembly in wast text form, in which breakpoints can be set before it gets executed by instantiate.
But you can't debug from the original C-source files, Chrome DevTools only shows the decompiled wast yet. This feels like the stone age of debugging, but it is still possible to debug.
Edit 2020: This article https://developers.google.com/web/updates/2019/12/webassembly seems to indicate you should now be able to debug in devtools, from the original C source files. I did not try it, though.

No configuration setting found for key 'wdm.geckoDriverVersion' - WebDriverManager

I'm using the webdrivermanager(Java) and I think is configured (pom.xml), because Chrome and IE are working. Only FireFox is showing this menssage "No configuration setting found for key 'wdm.geckoDriverVersion'"
*The exemple works to.
So, Boni or other member can help me with this problem?
Thanks.
EDIT:
I have this error only with PhantomJs and FireFox. The code is the same(examples git). First I thought that would be the POM but Chrome and IE are working. Thanks for your support.
https://i.stack.imgur.com/KJOnO.png
https://i.stack.imgur.com/at3qm.png
It seems that the library used by WebDriverManager for configuration (com.typesafe.config) is not able to find the properties file for some reason. As of WebDriverManager 1.5.0, this file name is webdrivermanager.properties.
In any case, I would use the latest version of WebDriverManager and try again.

Runtime error: "Cannot find the library com.ibm.xsp.extlib.library" (browser)

I just created my first Xpage application, and I now wanted to port it to a simple mobile application, using the mobile controls in the Xpages Extension Library. Notes/Domino 8.5.3 Upgrade Pack 1 are installed on both client/Designer and server.
The Xpage application works fine in both client and browser.
I created a new Xpage, called "mobileMainPage", and simply add a Single Page Application control to it, save the file and attempt to open it through a browser (Safari first, then IE 9 just to test). In both cases I get the following error message:
Unexpected runtime error
The runtime has encountered an unexpected error.
Exception
Cannot find the library com.ibm.xsp.extlib.library, required by the application /Contacts.nsf.
I am opening the database on the server (entering the URL of the .xsp file in the browser). I am not using the preview browser feature of Domino Designer, but is calling the page like a user would.
How do I fix this? I even tried to install Upgrade Pack 1 once more. Still getting the same error message.
It really sounds like the library is not installed on the server.
type tell http osgi ss com.ibm.xsp.extlib on the server console and verify that the plugin is installed, that command should return a list of the extlib plugins and fragments and if they have been correctly resolved or not.
in your Domino console type:
tell http xsp diag com.ibm.xsp.extlib
also try:
tell http xsp diag com.ibm.xsp.extlib.mobile
This will tell you whether or not the plugin is resolved. If the plugin is not found it means the plugin is not installed the to correct location (domino/data/domino/workspace/applications/eclipse/plugins).. If a plugin that extlib depends on is not resolved it will show in the console.
Chapter 3 of the XPages Portable Command Guide goes into this in great detail :-)
Let me know the results of the above command
Make sure to tell your app that it should use the extension library. Open the Application Properties and go to the Advanced tab. Here, verify that the 'com.ibm.xsp.extlib.library' is checked.
I just encountered a similar issue when firing up a new server in a virtual machine (was testing out an issue with different server version). I included notes.ini setting OSGI_HTTP_DYNAMIC_BUNDLES and pointed it to a updatesite database I hastily replicated over from another server.
I am not certain for sure, but once I added my new server to the updatesite and restarted http, it took.

Resources