Tips &Tricks

selenium 0

Automate chrome apps

Chrome apps writ­ten using web­view are dif­fer­ent than iFrames because web­view is a sep­a­rate process. With Sele­nium 2.20 it is pos­si­ble to auto­mate chrome apps writ­ten using web­view. dri­ver = webdriver.Chrome(desired_capabilities={‘chromeOptions’:{‘windowTypes’:[’webview’]}}) driver.get(‘chrome://apps’) wait_for_new_window_to_appear() driver.switch_to.window(driver.window_handles[1])…

javascript 0

push vs concat vs spread

push, con­cat and spread all of them are object/array manip­u­la­tion meth­ods. push — mutates the orig­i­nal data var a = [1, 2, 3]; a.push(9); // returns 4 console.log (a); // [1, 2, 3, 9] concat…