i'm using selenium test appllication running on firefox browser, when want click on button selenium, don't find it. find strange since can see element eye. have tried multiple method worked other exemple : wait.until(expectedconditions.visibilityofelementlocated(by)) wait.until(expectedconditions.presenceofelementlocated(by)); (i use xpath in path variable, , i'm sure correct) setting implictlywait on driver putting thread.sleep(1000) then again, post here because don't understand why selenium not see element diplayed on browser. important information maybe giving me proper answer html dom dynamically generate websocket triggered javascript event. edit 1: <button type="button" class="btn btn-xs btn-block btn-stroke" id="252_button"> delete </button> the element i'm trying access. use xpath it. it's not in iframe element. to access element did method supposed find , click on giving xpath in para...
i'm doing custom authorize attribute. want use attribute in class , controller level. this code work on method level public class customauthorizeattribute : authorizeattribute { public customauthorizeattribute([callermembername] string callername = null) { callername = callername; } public string callername { get; set; } protected override bool authorizecore(httpcontextbase httpcontext) { if (httpcontext.user.isinrole("admin")) return true; ... if (callername == something) { } ... return base.authorizecore(httpcontext); } } like that [customauthorize()] public actionresult index() { return view(); } but want use globally in controller [customauthorize()] public class usuarioscontroller : controller { salusdbcontext db = new salusdbcontext(); // get: usuarios public actionresult index() { ...
i try create factory, here's code: public class myfactory { public static <t> mybase create(class<t> _c) { if (_c.getclass().equals(derived1.class)) // (1) return createnewderived1(); return null; } } // caller myfactory.create(derived1.class); it compiles warning @ line (1) : error 'equals()' between objects of inconvertible types 'class<derived1>' , 'class<capture of ? extends class>' <br>reports calls .equals() target , argument of incompatible types. while such call might theoretically useful, represents bug. and in runtime if statement fails reason. how can intended behaviour? public class myfactory { public static <t> mybase create(class<t> _c) { return ( _c == derived1.class ) ? createnewderived1() : null; } } // caller myfactory.create(derived1.class); see compare class objects further info. fiy, "real" class obje...
Comments
Post a Comment