click action not performed due to Softkeyboard enable(Hide the keyboard also its not working) but test is passed - android-softkeyboard

I tried get login into my account using this capabilities
Android version-7.0
Appium version - 1.71
java-client - 5.8.0
selenium-standalone server -3.52.0
1.first username, password entered successfully using selenium
2.while entering password soft keyboard was enabled but I did hide keyboard also
3.But I clicked login but it is passed but where it is clicked I don't know
(I thought it might be soft keyboard issue)
Please let me know why the action not performed.

Is a native app, hybrid, web? Paste what you got until now...
Anyway, if you searched the element before the software keyboard is hidden and you try to click it after the keyboard is not longer visible... Then you could have a problem.
Add a delay for a few seconds and search again for the element and try clicking
What are you using to hide keyboard? I guess -> driver.hide_keyboard() method? Have you tried doing click at X, Y coordinates like 10,10 that are obviously out of the keyboard(for example...). Or have you tried simulating terminal back button? -> driver.back()
If 1. and 2. are not working, why don't you try with capabilities -> 'unicodeKeyboard' and 'resetKeyboard' setted to true?
You will need to provide more information to be able to help. Then I will edit my answer with code and examples

Related

Add to Accessibility

Alright, my app uses features which require Accessibility, and so I have to bring up the System preferences menu so the user can add our app.
First, I check if Accessibility is enabled. I can do that easily, but I'm having trouble bringing up the systems pane with the Application added to the side panel.
First, I tried using a dictionary along with AXIsProcessTrusted, but to no avail; no dialog showed.
Second, I tried using a trick:
let event = CGEvent(keyboardEventSource: nil, virtualKey: 0, keyDown: true)
event.post(.cghidEventTap)
If our app is not added to Accessibility, then a dialog will pop up, and everything that goes along with it.
Now the important part is that when you press Deny on the dialog, it will still add our app to the Accessibility, but it will NOT be checked.
The issue is that when you do the trick again, and the app is added to Accessibility but is NOT checked, then nothing will happen. No indicators, nothing. That means you don't know if it showed up or not.
Now the third thing i tried is using
NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")!)
, which brings up the Accessibility menu.
However, it does not add our app to the side panel.
I've also tried using https://stackoverflow.com/a/18121292/14834900, however, all that does is just bring up the menu, like #3.
Recap
The first method does not work.
The second method brings up the dialog only when our app is not present in Accessibility, but gives no indicator of whether it brought the dialog up or not, which is required because if it did not bring up the dialog, then I would just use method #3, else, I would just continue.
The third method works but does not add our app to the side panel, so the user has to do it himself.
Is there anyway to make the third method add our app to Accessibility, but with it not checked, just like method #2?
The biggest issue I'm facing right now is how to add our app to the Accessbility side panel programmatically, just like the Trick #2
Thanks, I really appreciate it if anybody can lend a hand.

Prevent users from typing and clicking in MS Word Add-in

I am writting a MS Word Add-in, I create a button to run a long time work with text. My work requires that during the time it is excuted, no change can be made by user ( typing, clicking, deleting ...) When this work is completed, user can type and click as usual.
I have used
this.Application.Options.AllowClickAndTypeMouse = false;
However, this doesn't work.
Who can help me!
First, your approach is wrong. The Click and Type is Word functionality and has nothing to do with disabling user Mouse clicks
(For more information about Click and Type refer to here).
Now for your question, here is one approach I would suggest:
If the user is not able to do any action, I would expect an appropriate message, so my idea is to create a modal form by using:
myForm.ShowDialog();
It should do the job and block the active document until it get closed.
I would also add a nice progress bar and "Close" button which you will enable when work has done.

Disabled keyboard state in iOS 6?

I have implemented a "token" or "chip" text field similar to the stock messaging apps where a user enters entries which become colored tokens. When a user presses backspace, it highlights the token, and one more backspace deletes it. This all works great on iOS 5.
On iOS 6, however, once my tokens (UIView-based) are highlighted, and they call becomeFirstResponder, the keyboard becomes disabled as seen below. When testing in the simulator using the "hardware keyboard", things still work fine, but a real user on device cannot press backspace again since it is disabled.
How does one avoid this? What calls/properties should I even be looking for? In my research I am unable to find what this mode is called or how it is used.
Thanks!

Unable to locate WindowID

I am currently testing a web app using selenium rc with eclipse. I've been having issues with a single pop up window which appears when a submit button is clicked. The confirmation window appears with a single 'ok' option.
I've also tried 'chooseOKonnextConfirmation' in conjunction with .getConfirmation but eclipse tells me no confirmation exists. I've tried inspecting the window itself with firebug but have been unable to get any results.
I also tried with "selenium.selectWindow(getAllWindowIDs ()[1]);" but selenium not recognizing "getAllWindowIDs".
Could somebody please tell me how I can retrieve the windowID and the associated API commands I need to implement to get rid of this problem?
from your description, i understand that you have an ALERT window being appeared after clicking SUBMIT button but not the CONFIRMATION window.
if my understanding is correct
( you said single OK button - ALERT window appears with single OK button - CONFIRMATION window appears with OK and CANCEL buttons - there is another window javascript can generate which is CONFIRMATION.it appears with TEXT field and OK and CANCEL buttons )
so you must use accordingly.
here is what you should use
if(selenium.isAlertPresent()) {
String message = selenium.getAlert();
}
this will consume you Alert window and you can check the message displayed on Alert window if you want.
if this is not please post write your comment
It's selenium.getAllWindowIds(); note the capitalisation. Don't forget to make sure the popup has already appeared (e.g. selenium.waitForPopUp()).
Yes sudarsan is correct if you have an alert.
If you have an popup window not an alert with OK button then you have to click OK when popup appears.
If you are unable to locate the button use firebug to locate the element.

disable back button on in ltk wizardinputpage

I'm doing a plugin in Eclipse IDE in order to do a refactoring. I'm using LTK, the point is: I don't know how I can disabled the back button after the preview. I've tried to create the RefactoringWizard using some flags like 'NO_BACK_BUTTON_ON_STATUS_DIALOG', but I think it is not the rigth way to do it.
The poblem I have in the background is that when I push preview and then push back, and preview again, the preview box shows the change related with the refactoring twice!.
I think the best solution is disabling the back button after the preview because this is the solution I have seen in others plugins.
Sorry because of my English and thanks beforehand.
The method org.eclipse.jface.wizard.WizardDialog#updateButtons disables the back button when currentPage.getPreviousPage() returns null. So, I suggest you to override the method org.eclipse.ltk.ui.refactoring.RefactoringWizard#getPreviousPage to return null.