qentinelqi / qweb

Keyword driven automation for the web
https://github.com/qentinelqi/qweb
Apache License 2.0
40 stars 17 forks source link

Missing keywords #qweb library, whereas present in other libraries. #38

Closed rajeevpramanik closed 3 years ago

rajeevpramanik commented 3 years ago

Hello Team,

First, I would thank the entire team of qentinal/qweb for giving us this wonderful library for web automation . This is an incredible library I have seen.

I think very few keywords are missing according to me, which are needed for large-size projects.

Below is the list of keywords.

**1. Get Browser Aliases

  1. Get Browser Ids
  2. Switch Browser
  3. Execute Async Javascript
  4. Forward
  5. Internet turn on/off for the currently active window
  6. There should be a keyword for check the HTTP Live Streaming
  7. There should be a keyword for check the WebRTC
  8. There should be a keyword for check the WebSocket functionality
  9. Highlight the Elements when using the keyword for image action performing: "IS ICON" & "VERIFY ICON" & "CLICK ICON"
  10. Internet speed of the current browser 3g, 4g, 5g or 10 mbps, 50mbps and goes on**

Also, there are many keywords that are present in other libraries. Kindly look into those.

If you could implement those keywords, then it would have helped a lot for the large-size project.

Thank you.

tkoukkari commented 3 years ago
  1. Will be part of next release. (1.1.1) Actually we can't highlight them in the same way as web elements, since we are comparing images (i.e screenshots and reference images, not the actual browser). But we can provide a highlight where icon was matched and add that image to logs. This will be a separate setting and by default off, since logs can be huge if you have a lot of screenshots there. But you can enable it by: SetConfig LogMatchedIcons True

...and then you would have an image highlighting where icon was found on the log.

Example image on logs (lock icon was found using VerifyIcon): temp_matched_image-adde3d99-772e-4265-ba5e-8879b57d3416

tkoukkari commented 3 years ago
  1. (Forward) Will be added
tkoukkari commented 3 years ago
  1. Rejected. This is not really the scope of QWeb. We for example rely on checking when page has been loaded. It will not be loaded if there's no internet, so basically your next action will fail in any case. In addition, this seems to be Chrome specific in selenium.

However, you can easily do this also with QWeb. Example:

# Get the webdriver instance
${driver}=                     Return Browser 
# You can call any selenium functions                            
${driver.set_network_conditions(offline=True, latency=1000, throughput=0)}    
goto                           https://www.qentinel.com  # No internet, will not work
rajeevpramanik commented 3 years ago
  1. Will be part of next release. (1.1.1) Actually we can't highlight them in the same way as web elements, since we are comparing images (i.e screenshots and reference images, not the actual browser). But we can provide a highlight where icon was matched and add that image to logs. This will be a separate setting and by default off, since logs can be huge if you have a lot of screenshots there. But you can enable it by: SetConfig LogMatchedIcons True

...and then you would have an image highlighting where icon was found on the log.

Thanks for the information.

rajeevpramanik commented 3 years ago
  1. Rejected. This is not really the scope of QWeb. We for example rely on checking when page has been loaded. It will not be loaded if there's no internet, so basically your next action will fail in any case. In addition, this seems to be Chrome specific in selenium.

However, you can easily do this also with QWeb. Example:

# Get the webdriver instance
${driver}=                     Return Browser 
# You can call any selenium functions                            
${driver.set_network_conditions(offline=True, latency=1000, throughput=0)}    
goto                           https://www.qentinel.com  # No internet, will not work

Thanks for the information 🐱

tkoukkari commented 3 years ago

1-3. Partly approved. We will add SwitchBrowser on next release, thanks for explaining the use case. However, at this point of time we can't add aliases. We also want to keep the keyword syntax / arguments aligned with SwitchWindow, i.e. you either use index or "NEW". NEW would move to latest opened browser, index would open by index number in brower cache.

tkoukkari commented 3 years ago

Thanks for proposals. We've had all which we intend to implement there in QWeb for a while and for others there were some tips in the comments.