Posts

Showing posts from July, 2023

selenium commands

 *Handling Frames: Difference between Frame and Iframe:   Frame is a HTML tag that is used to divide the web page into various frames/windows. Used as <frame> tag, it specifies each frame within a frameset tag.  Iframe as <iframe> is also a tag used in HTML but it specifies an inline frame which means it is used to embed some other document within the current HTML document. * Syntax for handing frame: we can identified frame in three approaches driver.switchTo().frame(name/id) driver.switchTo().frame(WebElement) driver.switchTo().frame(index) 1) driver.switchTo().frame("packageListFrame");  we use switchto() in order to switch between the frames and we pass Specific frame name  2)WebElement frame2=driver.findElement(By.xpath("//frame[@src='frame_2.html']")); driver.switchTo().frame(frame2); here we identified the frame as webelement  and stored in variable and passes that variable in frame() 3) driver.switch.frame(0); here we used index of the f...

Javascript protractor commands. issue

Protractor is a  Node.js  program,T o run, you will need to have Node.js installed. You will download Protractor package using  npm , which comes with Node.js. By default, Protractor uses the  Jasmine  test framework for its testing interface. Setup Use npm to install Protractor globally with: npm install -g protractor This will install two command line tools,  protractor  and  webdriver-manager . Try running  protractor --version  to make sure it's working. The  webdriver-manager  is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with: webdriver-manager update Now start up a server with: webdriver-manager start This will start up a Selenium Server and will output a bunch of info logs. Your Protractor test will send requests to this server to control a local browser. Leave this server running throughout the tutorial. You can see information about the status of the...