angularjs - A way of clicking on hidden elements in protractor end to end tests -


is there way click on hidden value in sub menu. able

driver.findelement(protractor.by.xpath('/html/body/div/div/a')).mouseover.then(function() {     ptor.findelement(protractor.by.classname('name').gettext().then(function(result) {         expect(result).tobe('me');     }); }); 

when menu item not visible, or limited @ moment. if not possible there way around issue @ present.

ok after long , painful search trying find answer question came across answer trying answer different question.

most of documentation found explain must use actions in form of webelement , cast javascript , pass script element in form of array click action.

well same kinds goes here few modifications.

describe('', function() {     var ptor = protractor.getinstance();     var driver = ptor.driver;      it('', function() {         var hiddenelement = driver.findelement(protractor.by.yourchosenlocator(''));         driver.executescript("arguments[0].click()", hiddenelement).then(function() {             expect(whatever).tomatch(whatever);         });     }, 30000); }); 

as can see there no use of webelement , no cast required.

here sources helped me in search answers

how click on element hidden using selenium webdriver?

selenium webdriver – how click on hidden link or menu

selenium webdriver - hidden select , anchor [duplicate]


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -