Purchase.wasParchased returns falls in Google Internal Testing - in-app-purchase

Internal testing with google-play use to give "TRUE" values for Purchased.wasPurchased() method if purcahased. However, after "publishing app", new "internal tests" for new versions do not give TRUE for the waspurchased method.
Ofcourse the wasPurcahsed method works fine in Codenameone Simulator.
Did anyone encounter this?

Related

Playwright & Accessing sessionStorage

I have an application that I want to test with some automated UI tests, where the devs have stored some of the user's preferences in the sessionStorage. There appears to be a bug where the session storage isn't getting cleared out when we expect it to be. This is the bug I'm trying to recreate.
After fighting with pure Selenium for a while, I tried Playwright, and I almost have this working, but not quite.
I'm using C# (.NET 6) with Playwright.Nunit 1.27.1.
In my test, the user logs into the site, and after the site is logged into, I want to get the preferences object from the session storage. This is the code I'm using for that section:
// NOW GET SESSION
// sessionStorage.getItem('settingsObj')
var sessionStorage = await Page.EvaluateAsync<string>("() => JSON.stringify( sessionStorage.getItem('settingsObj'))");
Console.WriteLine($"STORAGE? {sessionStorage}");
}
When I run this test, the sessionStorage prints out as a NULL.
However, if I run this test in the debugger, with breakpoints on the var sessionStorage... line and the Console.WriteLine... lines, I see that the sessionStorage DOES contain my object during the run.
So. How do I get this object OUT so I can parse it?

UI5-Application: Call to functionimport works ONLY in WebIDE but fails everywhere else

We are developing a custom UI5 application.
It is developed in the WebIDE, and therefore deployed as a BSP.
When we use the underlying model for calls ( currently 3, no CRUD ), we chose the path of using ONLY functionimports to communicate with the backend.
All of them work with the POST method.
And all of them work ONLY inside the WebIDE.
Once, I access the BSP URL otherwise, we get HTTP 500 error with "error while requesting the ressource.
We already created links, to enable special portfowarding, no result.
Let's stick to my URL from the BSP first.
I paste it into my 3 browsers: 500.
We also created a special non dialogue-user with proper roles and permissions, and in the SICF tree we assigned it .
Again, when calling from inside the WebIDE, the functionimport-calls work, otherwise not.
Error-Logs are empty.
Dumps do not happen.
ST05 trace shows where 500 is passed, deeply inside the HTTP framework, yet no chance to spot the code location, neither a breaktpoint.
In SICF logon-settings we have:
Types all, also flagged "all", SAML: inherited from parent node, sec-sessions Not limited, fix user and pw, sec: Standard, auth:Standard Sap user.
The gui-options contain ONLY one flag: ~CHECK_CSRF_TOKEN 0.
In my client I use :
Where the model is initialized as :
function initModelV2() {
var sUrl = "/sap/opu/odata/sap/Z_this_is_a_company_secret_service/";
var oModel = new sap.ui.model.odata.v2.ODataModel(sUrl);
sap.ui.getCore().setModel(oModel);
}
What else can I do to get "at least closer" to the reason, WHY ?
I could solve it, and believe it or not, sometimes simple logic helps.
I debugged the backend of CL_HTTP_RESPONSE, and once I saw, GET_STATUS, I thought to look for SET_STATUS.
There it was:
this.rModel.setHeaders( {"X-Requested-With" : "X" } );
Was missing.
Though I set it in the manifest of my model, it was not passed.
Once set in the code, it worked.
I wonder, why it is not accepted in manifest.
I have an assumption.
1st: I have this in my manifest ( yellow arrow shows, where i HAD it set up before):
But I also have an instantiation in my code, in servicebindings.js with this code
Can it be, that, in the end, I have accidently created 2 models ?

Options page not showing

I'm writing a new add-on as a Web Extension. In my package.manifest, I have the options_ui set:
"options_ui": {
"page": "options.html"
}
But in about:addons, the options button is not present.
So I tried to call the page directly from my background script:
runtime.openOptionsPage();
But I get this error:
Message: ReferenceError: runtime is not defined
Same error type with:
chrome.runtime.openOptionsPage();
Message: ReferenceError: chrome is not defined
I'm probably missing something very obvious there. I tested with Firefox ESR 45.0.4 and the latest Firefox Dev edition (51.0a2). How can I get the options page to show in about:addons and how can I call it from my background script?
It's browser.runtime.blah or chrome.runtime.blah.
I'm not sure if ESR 45 supports it.
This code should go in you background script right?
Please post more of your code so i can update my answer.
It turns out that I was mixing Web extensions with Add-on SDK

Unable to click button using NHtmlUnit

I have a unit test which simulates a login on Uber. The goal is to acquire a token that isn't otherwise accessible without an interactive login. I've had this working in the passed but it appears the Uber login experience has changed and now I'm having issues getting NHtmlUnit to successfully submit the login button.
Here's my latest attempt: https://github.com/wadewegner/uber-sdk-for-net/blob/42fd845fe43e11e3153b07d830ed40e3577b1ed3/src/UberSDKForNet.FunctionalTests/Tests.cs#L100
Here's the key area:
var loginFormButtons = loginForm.GetElementsByTagName("button");
Assert.IsNotNull(loginFormButtons);
var loginButton = (HtmlButton)loginFormButtons.First();
Assert.IsNotNull(loginButton);
var loginButtonText = loginButton.AsText();
StringAssert.Contains("sign in", loginButtonText.toLowerCase());
loginButton.SetAttribute("type", "submit");
loginForm.AppendChild(loginButton);
var consentPage = (HtmlPage)loginButton.Click();
Assert.IsNotNull(consentPage);
I know the code is verbose, but unit testing NHtmlUnit is a nightmare. I've also tried a ton of different permutations, but they pretty much all end up with a HtmlButton.
Everything works great until https://github.com/wadewegner/uber-sdk-for-net/blob/42fd845fe43e11e3153b07d830ed40e3577b1ed3/src/UberSDKForNet.FunctionalTests/Tests.cs#L174. What I'd expect is for this to take me to the consent page where I'd either allow or deny the Uber app access to my information. However, it appears to simply reload the original page and consentPage appears to simply be the same as loginPage.
Any NHtmlUnit experts who might have some ideas?
The only thing I'll also point out is that in the past I was able to successfully use HtmlSubmitInput instead of HtmlButton but this appears to be one of the changes made by Uber. Perhaps this is part of the problem?
Well, it's not perfect, but it appears setting the WebClient to FIREFOX_17 instead of CHROME solved it.
var webClient = new WebClient(BrowserVersion.FIREFOX_17);
See here: https://github.com/wadewegner/uber-sdk-for-net/blob/ceb1cdf80cebb31608744c050b649ddd6a75fb7a/src/UberSDKForNet.FunctionalTests/Tests.cs#L107

sendkeys command causing exception in selenium webdriver on IOS safari

I have been trying to run some sample Remote WebDriver tests on the Safari browser on the IOS Simulator 7.0 (IPhone) but my tests give an exception every time I try to type in values on a text box. Just trying to use the example from iosdriver
DesiredCapabilities safari = IOSCapabilities.iphone("Safari");
RemoteWebDriver driver = new RemoteWebDriver(new URL("http://<someip>:4444/wd/hub"), safari);
driver.get("http://hp.mobileweb.ebay.co.uk/home");
WebElement search = driver.findElement(By.id("srchDv"));
search.sendKeys("ipod");
search.submit();
gives me the exception
a "org.openqa.selenium.NoSuchElementException: cannot find element for criteria :{"AND":[{"l10n":"none","expected":"UIAElement","matching":"exact","method":"type"},{"l10n":"none","expected":"Address","matching":"exact","method":"name"}" .
Anyone else run into this? It is identifying the element but typing in values fail..It works fine when I try it on firefox on my desktop.
I am no expert, but am familiar with selenium webdriver..
Are you sure that the id for "search " --- ('srchDv') actually exists on the page you are trying to automate?
if so
i would then look into the UIA -Element Hierarchy / Accessibility link to UIA Element Class reference
Hope this is helpful
You have an incorrect selector. The page you are automating does not have an id srchDv. If you are getting the search box, then you need to use:
driver.findElement(By.id("gh-ac")).clear();
driver.findElement(By.id("gh-ac")).sendKeys("ipod");
Also, instead of using submit, personally i would follow the way that your user would commit the action, and that's by clicking the search button.
driver.findElement(By.id("gh-btn")).click();

Resources