popupwindow

How to download .docx file using Selenium webdriver in Java?

橙三吉。 提交于 2019-11-30 03:48:41
问题 Can anyone let me know how to download a word file using selenium(java)? My below code is not working. FirefoxProfile prof = new FirefoxProfile(); prof.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/word"); When I click on 'download link or icon' in the page, it prompts a popup to save the download file (see image below) and I need to click on OK button in the popup. Please let me know how to do this using Firefox. 回答1: You need to use ROBOT class for firing an ENTER

Switch to popup windows in cucumber, capybara

笑着哭i 提交于 2019-11-29 13:41:56
In RSpec i can use such code switch to popup window, link , How can i do such thing in Cucumber steps? login_window = page.driver.find_window('PPA_identity_window') main_window = page.driver.find_window('') # We use this to execute the next instructions in the popup window page.within_window(login_window) do #Normally fill in the form and log in fill_in 'email', :with => "<your paypal sandbox username>" fill_in 'password', :with => "<your paypal sandbox password>" click_button 'Log In' end I don't think there is a cucumber/capybara way to do this as such. But you can still change the window

Change gravity of PopupWindow

女生的网名这么多〃 提交于 2019-11-29 10:21:37
问题 I have a button that must show a popup window. And the popup window must be aligned with the right side of the button. That's how I do it. button.setOnClickListener( new View.OnClickListener() { @Override public void onClick( final View view ) { if(popup == null) { final View view = getLayoutInflater().inflate(R.layout.popup, null); popup = new PopupWindow(view); } if(popup.isShowing()) { popup.dismiss(); } else { popup.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED); popup.setFocusable

EditText in PopupWindow not showing keyboard even if setFocusable(true)

烈酒焚心 提交于 2019-11-29 05:51:21
I can't seem to get this work. I already set popWindow focusable as to what I read on other forums but still no luck. xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="fill_parent" android:adjustViewBounds="true" android:background="@drawable/popbg" android:orientation="vertical" > <Button android:id="@+id/cancel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_marginRight="10dp" android:layout

I my using google mapV2 and i m downloading image from google place api and want to display in the popup

时光毁灭记忆、已成空白 提交于 2019-11-29 05:22:37
i m using all the classes for geting image through Url. ImageView imV= ((ImageView) view.findViewById(R.id.badge)); // Image url String image_url = "http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png"; final int stub_id = R.drawable.ic_action_search; // ImageLoader class instance ImageLoader imgLoader = new ImageLoader(getApplicationContext()); // whenever you want to load an image from url // call DisplayImage function // url - image url to load // loader - loader image, will be displayed before getting image // image - ImageView imgLoader.DisplayImage(image_url,stub_id ,imV); but

android : Open pop-up window in my webview

房东的猫 提交于 2019-11-29 03:01:03
问题 I have webview in my application and I want it to open pop up windows when clicking on a link inside webview. I have added following code but it didn't work:- WebSettings webSettings = webViewPage.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setSupportMultipleWindows(true); webSettings.setJavaScriptCanOpenWindowsAutomatically(true); the popup should appear like this 回答1: I am answering my own question after 3 long years: When a link is touched inside a webpage then

how to make window.open pop up Modal?

吃可爱长大的小学妹 提交于 2019-11-29 02:09:58
I am currently using window.showModalDilog to open a modal pop up window which is not allowing the parent window to do any action. But in the google search, I found that it is not the standard method and various browsers has stopped supporting this function. In fact I am facing this problem in Opera. Opera gives me the javascript error and stops execution at that point. Nothing can happen after that error. So, I have only one option left and that is window.open. But I want to disable parent window (likewise in showModalDilog). I tried below code to do so: <script type="text/javascript"> $

How to display an existing ListFragment in a DialogFragment

∥☆過路亽.° 提交于 2019-11-29 02:02:05
I have the following problem: I have an exisiting ListFragment , but I would like to display this as a dialog. My first approach was to create a DialogFragment which has to ListFragment inside of it, but appearently it is currently not possible to put fragments in fragments. Extending DialogFragment instead of ListFragment is also not possible, because of the heavy use of ListFragment methods. Is there an easy way to do this? user655419 What works for me is 1) in xml layout for your DialogFragment called, let's say, DialogFragmentwWithListFragment specify ListFragment class E.g. dialog

Get The Measures of Popup Window

不打扰是莪最后的温柔 提交于 2019-11-29 01:25:33
I already set up the pop up window, but i want to center it below the button (View v), that needs to be clicked to open it: public void showPopup(Context c, View v){ int[] location = new int[2]; v.getLocationOnScreen(location); ViewGroup base = (ViewGroup) getView().findViewById(R.id.pup_pattern); LayoutInflater inflater = (LayoutInflater) c.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View pupLayout = inflater.inflate(R.layout.linearlayout_popup, base); final PopupWindow pup = new PopupWindow(pupLayout, android.view.ViewGroup.LayoutParams.WRAP_CONTENT, android.view.ViewGroup

When to use Android PopupWindow vs Dialog

这一生的挚爱 提交于 2019-11-29 01:04:54
I'm unclear about when to use PopupWindow vs Dialog. Any insight would be much appreciated. Thanks. They both use the addView() method along with various windowManager methods. The two are similar in that regard. Dialogs seem to come with more built-in features for interaction, such as handlers and buttons already included in the base class, while PopupWindows come with more built-in methods for positioning them about the screen. I think that each of them can do exactly the same as the other, but choosing between the two will be a matter of convenience to the programmer with regards to how you