none
Automate Chrome browser RRS feed

  • Question

  • Hello Guys,

    My name is Vivek and working as QC, software testing.

    I have developed an automation script using Microsoft automation UI using C#.

    Its working great and now I have to upgrade my script, where I have to open a chrome browse , enter URL also I have to click on extension, which works as a button.. 

    extension is just beside address bar.

    I had tried a lot with Microsoft automation UI using C# but am not able to found the extension.

    If any body over there, knows how to automate it, how to click on extension, I will be thankful .

    Make sure, I don't want to use X,Y co-ordinate or any Image recognition pattern.

    simply using code, searching element and trigger event..

    Thank you

     

    Friday, August 9, 2013 9:42 AM

Answers

  • I think your extension is "Browser Action" so it shows one button on the right of the address bar. So from the UISpy (tool to view the UI elements in Windows http://msdn.microsoft.com/zh-cn/library/vstudio/ms727247.aspx  contained in Windows SDK), we could find the Chrome Broswer extension pane and find the specific Broswer Action.

    For example, I have one custom extension, and name is in its manifest.json 

    {
      "manifest_version": 2,
    
      "name": "custom extension",
      "description": "...",
      "version": "1.0",
    
      "browser_action": {
        "default_icon": "icon.png",
        "default_popup": "popup.html"
      },
      "permissions": [
    
      ]
    }

    so the UISpy tree is below:

    then you could use code to search and find this button "custom extension" in browser. And invoke it Click to do testing. (Note, the extension must be shown in the view, cannot be collapsed in menu)


    Bob Bao

    Do you still use the same Windows 8 LockScreen always? Download Chameleon Win8 App quickly, that changes your LockScreen constantly.
    你是否还在看着一成不变的Windows 8锁屏而烦恼,赶紧下载这个 百变锁屏 应用,让你的锁屏不断地变化起来。


    Monday, August 12, 2013 2:41 AM

All replies

  • I suggest you to visit google's chrome developer forum for this question.


    Visual C++ MVP

    Friday, August 9, 2013 11:09 PM
  • I think your extension is "Browser Action" so it shows one button on the right of the address bar. So from the UISpy (tool to view the UI elements in Windows http://msdn.microsoft.com/zh-cn/library/vstudio/ms727247.aspx  contained in Windows SDK), we could find the Chrome Broswer extension pane and find the specific Broswer Action.

    For example, I have one custom extension, and name is in its manifest.json 

    {
      "manifest_version": 2,
    
      "name": "custom extension",
      "description": "...",
      "version": "1.0",
    
      "browser_action": {
        "default_icon": "icon.png",
        "default_popup": "popup.html"
      },
      "permissions": [
    
      ]
    }

    so the UISpy tree is below:

    then you could use code to search and find this button "custom extension" in browser. And invoke it Click to do testing. (Note, the extension must be shown in the view, cannot be collapsed in menu)


    Bob Bao

    Do you still use the same Windows 8 LockScreen always? Download Chameleon Win8 App quickly, that changes your LockScreen constantly.
    你是否还在看着一成不变的Windows 8锁屏而烦恼,赶紧下载这个 百变锁屏 应用,让你的锁屏不断地变化起来。


    Monday, August 12, 2013 2:41 AM