I was using desired capabilities for different browser and devices using below code in resource file. From last week onwards I could not able to run in Android device when I can contact BS they are telling use W3C protocal instead of leagcy protocal. Could you please guide how to fix this?
OpenAndroidBrowserStack
Set Environment
${remoteUrl} Set Variable https://${BROWSERSTACK_USERNAME}:${BROWSERSTACK_KEY}#hub-cloud.browserstack.com/wd/hub
&{desiredCapabilities} Create Dictionary device=Samsung Galaxy S20 os_version=10.0 browserName=Samsung browserstack.debug=true browserstack.realMobile=true browserstack.consoleLogs=info browserstack.local=false browserstack.networkLogs=true browserstack.selenium_version=4.1.0 browserstack.use_w3c=true browserstack.appium_version=1.17.1
Open Browser remote_url=${remoteUrl} desired_capabilities=${desiredCapabilities}
Related
This question already has answers here:
Logging Messages from Java Class back to the Karate Report
(3 answers)
Closed 1 year ago.
While using Karate I need to receive information from browser console (e.g. Firefox) when an error occurs.
How can I do it with Karate?
1) Is there any way to save the browser console log? (or attach it to features report)?
In Selenium I use this to log browser console in case error occurs:
if (webDriver != null) {
LogEntries logs = webDriver.manage().logs().get(LogType.BROWSER);
for (LogEntry entry : logs) {
LOG.error(entry.getLevel() + " " + entry.getMessage());
}
}
2) Is it possible to trigger it in similar way to take screenshot after scenario?
e.g (after scenario screenshot when some error occurs):
configuration:
karate.configure('afterScenario', read('afterScenarioScreenshot.js'));
afterScenarioScreenshot.js:
function()
{
if (karate.info.errorMessage) driver.screenshot()
}
Thank you for any idea.
The only suggestion I have is to use showProcessLog: true in the driver config.
Now you should see any FireFox process (console) logs in-line with the HTML report.
There may be ways to switch on the detailed logging that you want. Note that you can add command line options using addOptions in the driver config: https://firefox-source-docs.mozilla.org/testing/geckodriver/TraceLogs.html
The "WebDriver" way to switch the log level is by using the driver "capabilities". Refer the above link and see if you can set this for FireFox. It would be good if you post back your findings so that it helps others. In Karate, you use the webDriverSession to configure this.
The logs will be in some file. You should be able to write some code to scrape from it any time during a test if they don't show up in the HTML report.
If you need something more, please consider contributing code.
Rest Api has the option to set a "weight" (RouteFeatureWeightType) for every RouteFeatureType, while mobile SDKs have only on/off feature(es: you can ask a route with or without dirt road). Is there a similar function or workaround for mobile SDKs?
RouteRestrictions options to specify restrictions for route calculations. These include avoidSeasonalClosures, avoidAreas.
developer.here.com/documentation/ios-sdk/api_reference/Structs/RouteRestrictions.html
developer.here.com/documentation/android-sdk/api_reference/com/here/sdk/routing/RouteRestrictions.html
More features for routing are as follows :
developer.here.com/documentation/ios-sdk/api_reference/Routing.html
In one of our test machines, 2 browsers are counted though only 1 is displayed, causing UFT not to identify and enter value to objects since we are using RegEx:
Browser("title:=.*").Page....
We are using the below line to initialize IE:
InvokeApplication "C://Program Files/Internet Explorer/IEXPLORE.EXE"
What is the workaround for this?
UFT version is 12.02.
Thanks in advance!
I would first close all the open instances of IE by using:
SystemUtil.CloseProcessByName("iexplore.exe")
And then open the new instance using:
SystemUtil.Run "iexplore.exe","TestURL","C:\","",3
Check this link for more information on SystemUtil.
Follow below steps:-
1) close all the process of IE using WMI object.
Set ObjWMI= GetObject("WInmgmts:")
Set oProcess = ObjWMI.ExecQuery("Select * from win_32 Process")
For each p in oProcess
if p.name = "iexplorer.exe" Then p.terminate
Next
2) webUtil.deleteCokkies
3) Then open your application using systemUtil.run..
Hope it will help
Thanks for all your input. I learned a lot from you. I already found the root cause. It was after all not the multiple open browsers but a timing issue with the log in page for one of the machines. The email address text box object is visible however, it cannot be identified by UFT immediately that is why I added a sync point to wait max of 4 minutes until object.Exist(240)=true. Thank you all!
The problem of this Windows UWP code:
var devices = await DeviceInformation.FindAllAsync(GattDeviceService.GetDeviceSelectorFromUuid(new Guid("00001520-1212-efde-1523-785feabcd124")));
GattDeviceService m_service = await GattDeviceService.FromIdAsync(devices[0].Id);
is that m_service is always null. The BLE device which contains gatt service with 00001520-1212-efde-1523-785feabcd124 UUID is paired (the device is visible in device manager with no exlamation mark).
How to fix it?
To insert following code to Package.appxmanifest:
<Capabilities>
<m2:DeviceCapability Name="bluetooth.genericAttributeProfile">
<m2:Device Id="any">
<m2:Function Type="name:heartRate" />
</m2:Device>
</m2:DeviceCapability>
</Capabilities>
R. Wang's can be the correct answer, but is very hard and maybe impossible to change the Package.appxmanifest correctly by hand.
In visual Studio in solution explorer right-click on Package.appxmanifest and select open.
Click capabilities and thick Bluetooth and save Packagemanifest (ctr+s).
If this is not the solution for your problem, than we need more of your relevant code to help.
Do you know the protocol for Line and Wechat? I want to find link of Line and Wechat like yahoo(ymsgr:sendIM?userid) and skype(skype:userid?chat)
The protocol you are looking for is weixin://
We are currently aware of 2 different ways to call this:
weixin://contacts/profile/USERNAME - USERNAME is a variable
weixin://qr/DECODED_QR_CODE - DECODED_QR_CODE is the decoded version of a WeChat QR code.
* IMPORTANT NOTE: Please note this functionality has been deprecated*