browser

Is there a programmatic way to change user agent in Cypress.io?

妖精的绣舞 提交于 2020-01-13 09:32:29
问题 I have some ad calls that are only made on mobile devices. In Chrome, I can use Device Mode and simulate a mobile device, and the resulting ad call from the server is correctly tailored to mobile. I'm not sure how Chrome does this, except possibly by sending a different user agent. In the Cypress.io documentation, it says the user agent can be changed in the configuration file (Cypress.json). But, I need to run a test for a desktop viewport and then a mobile viewport with a mobile user agent.

Is there a programmatic way to change user agent in Cypress.io?

妖精的绣舞 提交于 2020-01-13 09:31:06
问题 I have some ad calls that are only made on mobile devices. In Chrome, I can use Device Mode and simulate a mobile device, and the resulting ad call from the server is correctly tailored to mobile. I'm not sure how Chrome does this, except possibly by sending a different user agent. In the Cypress.io documentation, it says the user agent can be changed in the configuration file (Cypress.json). But, I need to run a test for a desktop viewport and then a mobile viewport with a mobile user agent.

How to get PDF content (served from a Spring MVC controller method) to appear in a new window

风格不统一 提交于 2020-01-13 09:01:49
问题 I am a newbie with Spring MVC but I'm quite impressed with its capabilities. I am using 3.1.0-RELEASE and I have to show a PDF in response to form:form submission. Here is the (small) code I wrote in the controller: @RequestMapping(value = "new_product", method = RequestMethod.POST, params = "print") @ResponseBody public void saveAndShowPDF(ModelMap map, ShippingRequestInfo requestInfo, HttpServletRequest request, HttpServletResponse httpServletResponse) throws IOException {

Is Internet Explorer 9 an “evergreen” browser? What about IE 10?

时光毁灭记忆、已成空白 提交于 2020-01-13 07:32:12
问题 Chrome and FF will silently update to newer versions and I've read that MS did an auto-upgrade for folks on IE6 & 7 to IE8 and from IE8 to 9. Has Microsoft stated whether or not 9 and 10 will be pushing out regular (weekly/monthly) silent updates or is it going to be similar to what they did to bump people from 6 & 7 up to 8? 回答1: The latest versions of Chrome, Firefox, Edge, and Safari are evergreen browsers, i.e. they automatically update themselves silently without prompting the user.

How To set “Textbox” value in Gecko Browser?

女生的网名这么多〃 提交于 2020-01-13 06:39:07
问题 if its Source name="login" then how can i set User Name Value Source Html For userbname textbox: 回答1: Gecko is not that different with IE . try this way { HtmlElementCollection elements = Geckowebbrowser1.Document.GetElementsByTagName("input"); elements(1).SetAttribute("value", USERBOX.Text); elements(2).SetAttribute("value", PASSBOX.Text); elements(3).InvokeMember("Click"); } 回答2: Its simple in GeckoBrowser . Following two lines will set the Textbox value: GeckoInputElement txtbox = new

Android - can not access the html file on sdCard

爱⌒轻易说出口 提交于 2020-01-13 05:31:06
问题 I am trying to open html file that I have on my sdCard in Chrome or any other web browser (not html Viewer). I have tried to enter path to file like this file:///storage/extSdCard/page/page.html I get this error: ERR_ACCESS_DENIED What could be wrong please? EDIT: I have to mention that I am not developing a android app. I just want to view a html file, that is on my SD card in chrome mobile browser EDIT2: It is not working from ext. sdcard and also from internal memory Thank you. 回答1: This

Site accessibility: what screen readers, etc to test against, and how?

♀尐吖头ヾ 提交于 2020-01-13 05:31:06
问题 The web site that we're writing needs to be "Accessible". The trouble is, while we understand the general conepts (semantic latout, alt text on images, light on Javascript, etc etc), we don't really have much knowledge of what screen reader products or other accessible browser are actually on the market and/or in general use, nor how to test against them. So the questions are: What products do we need to know about? Would it be sensible (or even useful) to get hold of them to test against?

Is it possible to detect when a user switches tabs?

ε祈祈猫儿з 提交于 2020-01-13 05:13:07
问题 In particular, I am interested to know if it is possible to capture a user's click to a different browser tab. I guess technically I could get the blur and focus of the window object but if there was something more closely tied to the browser (IE, FF, Chrome, etc.) that would be even better. 回答1: IE If you are writing native code (i.e. a browser plug-in) you can use DWebBrowserEvents2::WindowStateChanged. Here is some sample code, for your IDispatch::Invoke() implementation: //

Finding and clicking a button with no ID within html code in WebBrowser

牧云@^-^@ 提交于 2020-01-13 04:03:07
问题 I basically have a web-browser control that is going through and automatically completing some forms, it's been a breeze so far, however I've gotten to a form that does not have the "submit " or "reset" button labelled with ID or Name. (I need to be able to click both) Example: Submit Button <td align="right" valign="middle" class="LeftSide" style="padding-right: 20; padding-top: 10;"><button class="Search" type="submit" tabindex="7"><b>Search</b></button></td> Reset Button <td align="left"

How can I use appium to automate browser on android?

≡放荡痞女 提交于 2020-01-12 16:09:51
问题 I want to use appium to automate browser on android phone,but I don't know how to set the capability. First, I have enabled USB debugging on my Android device in the developer options. Second, adb was working well, i can see the device id. Third, I started Appium.exe from Appium for windows and writed some code by JAVA, but I don't know how to set the capability on Android browser. public class Test { private WebDriver driver; @Before public void setUp() throws Exception { DesiredCapabilities