Skip to content
Advertisement

How to change selenium user agent in selenium-webdriver nodejs land?

I’m in javascript + mocha + node land. I have tried setting userAgent and ‘user-agent’ as keys on capabilities: There is this answer which says to use a firefox profile, but that’s not exposed. There is no driver.FirefoxProfile nor one exposed globally nor webdriver.FirefoxProfile nor driver.profiles etc. I have tried Googling and looking the source and the documentation but there

FullCalendar.js adjust header for mobile

I am using responsive styling in a project that uses the fullcalendar.js. Unfortunately, I can’t get the style of the header (fc-header-left, fc-header-center, fc-header-right) to stack on each other when in mobile view. For example… in desktop view it looks like… fc-header-left fc-header-center fc-header-right When mobile I would like the 3 parts of the header to stack on top of

How to Disable V8’s Optimizing Compiler

I’m writing a constant-time string comparison function (for node.js) and would like to disable V8’s optimizing compiler for this single function; using command-line flags are out of the question. I know that using a with{} (or try/catch) block will disable the optimizing compiler now, but I’m afraid this “feature” (bug) will be fixed in future versions. Is there an immutable

“continue” in cursor.forEach()

I’m building an app using meteor.js and MongoDB and I have a question about cursor.forEach(). I want to check some conditions in the beginning of each forEach iteration and then skip the element if I don’t have to do the operation on it so I can save some time. Here is my code: I know I could turn cursor to

How do I detect if window.location failed?

How do I check if a call to window.location failed because the given URL was invalid, etc? Is there some event I can set on the window object or on some other object that can catch this? Answer Finally got it to work using a “workaround” that is not a generic solution as I originally hoped: I am using the

Dragon NaturallySpeaking software not calling onAfterChange event

I am unable to get Dragon NaturallySpeaking 11 to fire an onkeyup event in JavaScript that works fine when a user types into the textbox. Does this software act differently than a keyboard copying and pasting text into a focused textbox? Answer Dragon dictation changes the text by sending messages (i.e., EM_REPLACESEL or WM_SETTEXT) instead of triggering keyboard events (i.e.,

Advertisement