ui-testing

UI Automation White framework “NonComVisibleBaseClass was detected” exception

泄露秘密 提交于 2020-08-02 08:11:47
问题 I am testing an application which loads a powerpoint (.ppt or .pptx) file insert it. Application gives same look an feel like powerpoint with some extra setting when the file is loaded inside the application. When I try to automate the application, I click a button to load the powerpoint file into the application. After the loading process white framework fails to continue playback. When I restart the same test again I got " NonComVisibleBaseClass was detected " exception. I can only continue

Need Help to check if element is in current Viewport with Testcafe

白昼怎懂夜的黑 提交于 2020-07-05 07:57:09
问题 I'm trying to implement a custom method to find out if the element is in the current view port Below is the snippet of code that I've tried to implement but the outcome does not render the boolean result: export const isElementInViewport = () => { const getBoundValues = ClientFunction(() => document.querySelectorAll(".hero-getstart").item(0).getBoundingClientRect()); const windowHeight = ClientFunction(() => window.innerHeight); const windowWidth = ClientFunction(() => window.innerWidth);

Espresso - how to switch typeText to English or other languages input mode

故事扮演 提交于 2020-05-14 22:45:30
问题 I'm using Espresso to implement my application's autotest framework. But in some test-cases I've designed, I found my test always fail, and the root cause is not in my testing codes on feature implementation codes. The root cause is in the android input methods mode, sometimes, it's in Chinese input mode, and my input text is English, then the input value will fail. So I want to know how can I switch the current typeText input method mode from Chinese to English, or how could I ensure the

Espresso - how to switch typeText to English or other languages input mode

有些话、适合烂在心里 提交于 2020-05-14 22:44:31
问题 I'm using Espresso to implement my application's autotest framework. But in some test-cases I've designed, I found my test always fail, and the root cause is not in my testing codes on feature implementation codes. The root cause is in the android input methods mode, sometimes, it's in Chinese input mode, and my input text is English, then the input value will fail. So I want to know how can I switch the current typeText input method mode from Chinese to English, or how could I ensure the

How do I erase an Xcode 10 simulator clone through CLI?

会有一股神秘感。 提交于 2020-02-03 07:52:13
问题 Do they share the same UDID? How are they implemented under the hood? The scenario is I have 4 clones running UI tests in parallel. I need a clean simulator for some tests (but want to keep random test order) 回答1: Command to erase all testing simulators (you'll need to restart Xcode after that): xcrun simctl --set testing delete all Overall, it should be better to just reset those sims (you won't need to restart after that): xcrun simctl --set testing shutdown all xcrun simctl --set testing

How to select elements with the same css selector

 ̄綄美尐妖づ 提交于 2020-01-25 09:28:04
问题 I have numerous elements in my ui tests that have the same css selector name but the issue I'm have is how to select each of them separately. I recall there was a way to add [1],[2] after each of them but i cant seem to make it work. I'm currently using "[data-qa-inning-value]"[1], "[data-qa-inning-value]"[2], etc but it is not picking it up, any help? It currently isn't picking anything up but I do remember there was a way to do it but I just cant find it in my notes 回答1: Ideally, you should

Espresso: Why don't spinners close after selection?

爱⌒轻易说出口 提交于 2020-01-21 09:26:30
问题 I have a question about selecting items in Spinners with Espresso. Or to be more exact: The selection works, but after that the view assertions fail because the spinner is still open. Let's say I have a really simple activity that contains a spinner and a textview that shows the selection, like this: Now, I wrote an Espresso test that selects 'dogs' and verifies the textview is updated accordingly: @Test public void selectDogs() throws Exception { onData(allOf(is(instanceOf(String.class)), is

Is there a way to find if the XCUIElement has focus or not?

我们两清 提交于 2020-01-10 13:03:27
问题 One of my screen has multiple text fields, I can land to this screen from different other screens. In each case I am making one or another text field as first responder. I am not able to write test to determine whether the desired textField has focus or not. When I print the textfield in console - Output: { TextField 0x131171d40: traits: 146031247360, Focused , {{6.0, 108.3}, {402.0, 35.0}}, value: ​ } But I could not find any focus/isFocus property on XCUIElement. Is there a way to achieve