Is it possible to use BrowserStack when using Browser library in RobotFramework
There is an article on how to do it with SeleniumLibrary ( https://medium.com/detesters/integrating-robot-framework-with-browserstock-bddf5b0e0c14 )
and also an article on how to do it with Playwright directly (see this page )
But can it be done with Browser library, and if yes, how is that done?
With the following init.robot file:
*** Settings ***
Force Tags test
Documentation Test Suite
Suite Setup Setup Browserstack
Resource ../Variables/variables.robot
Library Browser
*** Variables ***
&{desiredCapabilities} os=Windows
... os_version=10
... browser=chrome
... name=TestInit
... browserstack.username=${BROWSERSTACK_USERNAME}
... browserstack.accessKey=${BROWSERSTACK_ACCESSKEY}
... client.playwrightVersion=1.17.2
*** Keywords ***
Setup Browserstack
${BSENCODEDCAPS} Evaluate urllib.parse.quote( json.dumps(${desiredCapabilities}) )
Connect To Browser wss://cdp.browserstack.com/playwright?caps=${BSENCODEDCAPS}
It took some time, but with the help of a great colleague I was able to get this.
Related
I am new to test fairy and asked support but I did not hear from them so trying here.
The problem is that I cannot see the raw logs window within the session on the iOS app but I can see it when in android or when I run the app on the iPhone Simulator.
I followed the instructions to the letter to export the app as adhoc ecc...
Here is the api documentation.
https://docs.testfairy.com/FAQ.html
Oh I should also mention that I have a cordova / ionic app.
Thanks in advance.
Ok, so thanks to TestFairy amazing support especially #VijaySharma here is the solution for those in need.
Find the .pch header file in Platforms > iOS > MyApp > MyApp-Prefix.pch
In the header add the following.
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "TestFairy.h"
#define NSLog(s, ...) do { NSLog(s, ##__VA_ARGS__); TFLog(s, ##__VA_ARGS__); } while (0)
#endif
Save the file and Rebuild the app.
Also if you want to show all the logs make sure you have this plugin: https://github.com/apache/cordova-plugin-console
All set!
OK, I have a similar problem as Download ClickOnce fails from setup.exe and Download ClickOnce fails from setup.exe , where I have deployed a ClickOnce installer for a desktop app I am selling.
Different than those examples, I am using Visual Studio 2012 (Pro Version). Using .Net 3.5. I am deploying on a hosted LINUX machine. It worked for me and other people running Windows 7 & 8, possibly earlier versions of Widnows. Then after running a few tests in Debug mode, I built and deployed in Release mode. Now, the auto-installer breaks when it gets to the spot where it wants to download the .application file. Here's the log file.
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Microsoft Visual Basic PowerPacks 10.0', phase BuildList
Attempting to find 'Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=YADDAYADDA' in the Global Assembly Cache
AssemblyCheck: Error querying assembly info: -2147024894
Attempting to find 'Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=YADDAYADDA, processorArchitecture=msil' in the Global Assembly Cache
Assembly found at 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic.PowerPacks.Vs\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.PowerPacks.Vs.dll'
Setting value '11.0.50727.1 {version}' for property 'VBPowerPacksInstalled'
The following properties have been set for package 'Microsoft Visual Basic PowerPacks 10.0':
Property: [VBPowerPacksInstalled] = 11.0.50727.1 {version}
Running checks for command 'VBPowerPacks\VisualBasicPowerPacksSetup.exe'
Result of running operator 'ValueExists' on property 'VBPowerPacksInstalled': true
Result of checks for command 'VBPowerPacks\VisualBasicPowerPacksSetup.exe' is 'Bypass'
'Microsoft Visual Basic PowerPacks 10.0' RunCheck result: No Install Needed
Running checks for package '.NET Framework 3.5 SP1', phase BuildList
Reading value 'SP' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5'
Read integer value 1
Setting value '1 {int}' for property 'DotNet35SP'
The following properties have been set for package '.NET Framework 3.5 SP1': Property: [DotNet35SP] = 1 {int}
Running checks for command 'DotNetFX35SP1\dotNetFx35setup.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet35SP' and value '1': true
Result of checks for command 'DotNetFX35SP1\dotNetFx35setup.exe' is 'Bypass'
'.NET Framework 3.5 SP1' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697205'
Error: An error occurred trying to download 'http://www.mywebsite.com/ProductName/Downloads/oneclick/ProductName.application'.
I've looked at https://msdn.microsoft.com/en-us/library/ms229001.aspx , after which I set the MIME type of .application to x-ms-application. No difference.
When I put the url http://www.mywebsite.com/ProductName/Downloads/oneclick/ProductName.application into my browser, I get the text of the file, rather than a download.
Any thoughts??? Thanks!
OK, the first thing that got me closer to the solution was simply to reboot the PC I was dwonloading onto. This got me further into the install, but I then ran into another problem, the solution to which I found at ClickOnce application replace current installed fliles . Clearing out the folder C:\Users\Charles\AppData\Local\Apps\2.0got me to where I could install and run the app fully.
Window application in C #. My solution, I hope it serves someone. The domain server was damaged, I just changed the IP of the new DNS server. It was not necessary to join that new domain server IP.
The "An error occurred trying to download.." error occurs with one of our click-once apps and the solution is to turn off IE Enhanced Security from Server Manager (Server 2012R2+) on the target machine.
I'm trying to build a native bundle, specially for mac os x, but also in windows. And in both environments the .app, .dmg, .exe get generated correctly, but when I run them, I get many java.security.NoSuchAlgorithmException exceptions. For example:
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
Caused by: java.security.NoSuchAlgorithmException: PBEWithMD5AndDES SecretKeyFactory not available
My program uses TLS, to establish xmpp connections. And also I have a webview with HTTPS which is not loading eighter.
Does anybody have any idea why this could be happening?
I should note that if I run the generated jar alone, it works fine, it only happens with the .exe and .app.
This is my build.xml fx:deploy code:
<fx:deploy width="${javafx.run.width}" height="${javafx.run.height}"
nativeBundles="all"
outdir="${basedir}/${dist.dir}" outfile="${application.title}">
<fx:application name="${application.title}"
mainClass="${javafx.main.class}"/>
<fx:resources>
<fx:fileset dir="${basedir}/${dist.dir}"
includes="*.jar"/>
<fx:fileset dir="${basedir}/${dist.dir}" includes="lib/*.jar"/>
</fx:resources>
<fx:info title="${application.title}"
vendor="${application.vendor}"/>
</fx:deploy>
Appreciate your help.
I hadn't seen this post before: JavaFX WebView Not Loading HTTPS Page
What's happening is that the jre's bundle doesn't include the /ext folder, so you have to copy it with a script when you build the bundle.
I am trying to test a Mozilla plugin (developed using FireBreath) in the form of an .so shared object file. The plugin was developed on Ubuntu, where it works fine.
I am now trying it under OpenSUSE - so I first symlinked the .so file in ~/.mozilla/plugins:
> ln -s /path/to/npXXX.so ~/.mozilla/plugins/
... and then ran Firefox (7) from command line:
> /path/to/firefox -P myprofile
...
LoadPlugin: failed to initialize shared library libXext.so [libXext.so: cannot open shared object file: No such file or directory]
LoadPlugin: failed to initialize shared library /path/to/npXXX.so [/path/to/npXXX.so: undefined symbol: gtk_widget_get_mapped]
# and the LoadPlugin messages do NOT show a second time - probably because plugin is disabled (via about:addons).
And so I thought to try different stuff to look into this - but first, I restarted Firefox, and realized that on the second run I do not get the "LoadPlugin: failed to initialize" messages anymore! Then I tried removing the plugins symlink, and restarting FF; and adding it again, and restarting FF - still no error messages!
So, this tells me that probably Firefox somehow disabled/blacklisted the plugin (but which one: libXext, npXXX or both?) , but searching (grepping) for (np)XXX in '/path/to/myprofile/blocklist.xml' returns nothing (the plugin should use a email-like id, not those number GUIDs, so I'd expect that string to show in blocklist.xml if it's there).
Does anyone know: is the default behavior of Firefox to disable/blocklist plugins, that fail to load at first? If so, is there a way to force Firefox to load them again (and spit out error messages)? If you'd also have links to where this behavior is documented, it will be much appreciated :)
Many thanks in advance for any answers,
Cheers!
Note: after I stopped seeing the error messages, I did the following:
I am trying "about:plugins": "No enabled plugins found";
then trying "about:addons", and clicking under Plugins: "You don't have any add-ons of this type installed";
This plugin is not embedded in an extension, so nothing new should be added in "about:addons" under "Extensions" - and as expected, nothing new shows there. Under Ubuntu (where all works), just by symlinking the plugin to ~/.mozilla/plugins, the above two locations/screens start showing the plugin info.
This one of the things that puzzle me - if it just showed the plugin as "disabled", maybe I would have had a chance to re-enable it again (to get a new batch of error messages) - however, "about:plugins" and "about:addons" simply show nothing - so there's nothing I can use to enable from there. Which tells me Firefox has used a different method to disable the plugin(s) - but I cannot tell what it is...
Firefox has a cache for XPCOM modules ("fastload cache"), if a module fails to load Firefox won't try again. The cache is reset automatically if an extension is installed or if the application is updated. Starting with Firefox 4 you can also use -purgecaches command line flag to discard the cache.
I can't work out why my web based cucumber tests never terminate. All step definitions pass but the browser never exit on the last step and therefore my script is hanging.
I'm currently running cuke4duke (0.4.3), Geb(0.5.1), maven(2.2.1), selenium-firefox-driver/selenium-chrome-driver (2.0a6 and a7)
I've tested my scripts in Chrome and Firefox (3.6) / Windows XP and Ubuntu without any success.
Here is the output from my maven build
[INFO] Scenario: Navigate from homepage # features/helppage.feature:7
[INFO] Given I am on the homepage # Helppage$_run_closure1#f93ee4
[INFO] When I click on the about page # Helppage$_run_closure2#1c87031
[INFO] Then the title should display "About Google" # Helppage$_run_closure3#1f784d7
[INFO]
[INFO] 1 scenario (1 passed)
[INFO] 3 steps (3 passed)
[INFO] 0m5.421s
HANGING HERE
Env.groovy
import geb.Browser
import org.openqa.selenium.chrome.ChromeDriver;
this.metaClass.mixin(cuke4duke.GroovyDsl)
Before() {
new Browser(new ChromeDriver(),'http://www.google.com')
}
After() {
clearCookies()
}
helppage.groovy
this.metaClass.mixin(cuke4duke.GroovyDsl)
Given (~/I am on the homepage/) {
go('/')
}
When (~/I click on the about page/) {
go('/intl/en/about.html')
}
Then (~/the title should display "(.*)"/) { pageTitle ->
assert title == pageTitle
}
I'm not able to work out if the problem is in webdriver or in the cuke4duke distribution or anywhere else. I'm also not sure how I can add more debugging to the maven build in order to find out what is going wrong.
I think you need to call quit() on the Browser (you'll probably need to save a handle to it in your Before() hook).
I don't have time to test it for sure - we've moved from cuke4duke to cucumber-groovy, but I think it's actually a Geb Browser issue you're seeing here.
Have you tried running it without cuke4duke?
I found cuke4duke quite interesting but decided to even drop JRuby (not sure if you are using that) and go with a straight ruby installation, which is faster and more reliable.
Try updating to the latest jRuby (1.6.0). Might be related to this issue: Cucumber 0.4.3 (cuke4duke) with java + maven gem issues