Tech Tips

  1. Uncategorized
  2. 404 view

[Selenium]Change User Agent with IDE

Input following code as VerifyEval and “true” to expect value box.
var pref = Components.classes[";1"]

var nsISupportsString = Components.interfaces.nsISupportsWString

var ua = (Components.classes[";1"])
    ? Components.classes[';1'].createInstance(nsISupportsString)
    : Components.classes[';1'].createInstance(nsISupportsString); ="Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1";

pref.setComplexValue("general.useragent.override", nsISupportsString, ua);

Uncategorized recent post

  1. Run Amazon FreeRTOS on M5Stack Core2 for AWS …

  2. Udacity Self-Driving Car Engineer Nanodegree …

  3. Install sbt 1.0.0 and run sample template

  4. Visualization of Neural Network and its Train…

  5. [Machine Learning]Created docker image includ…